Git Product home page Git Product logo

scrollkit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

scrollkit's Issues

ScrollViewWithStickyHeader doesn't scroll on iPad

After successfully implementing ScrollKit on iPhone, when trying to test it on iPad, I found that half of the screen becomes un-scrollable when using an image as a header.

Attached is a video done using the code from the demo app

UnscrollableScrollViewWithStickyHeader.mov

This happens in both portrait and landscape modes, but it's more obvious in landscape with larger header heights.

Question: how can I use this library to dismiss a few on the pull down?

Hey, firstly, thank you for creating this library and also writing up an informative blog post! I found it very interesting. I'm a beginner in swiftui so apologies if this is something that's easy to do.

I'm trying to dismiss a view when you reach the top of the scrollview (similar to how the netflix app does it, where you can scroll the list and then you can reach to the top without it dismissing, but if you then pull down again, it will dismiss the view). Would really appreciate any pointers and advice you can give!

iOS 17 bug

Hello,
It seems that iOS 17 has broken the scale logic:
When you swipe down, the header doesn't scale up as expected. Instead, there's a noticeable twitching as it just jumps back and forth.
I can reproduce the issue on the simulator and a device running the latest iOS 17 beta.

Navigation bar height tracking doesn't work in iPad sidebar

If you use the ScrollViewWithStickyHeader in an iPad sidebar, the navbar height tracking will not work and the header will collapse to zero height.

Although using this component in a sidebar is not the intended use, this should be fixed.

Losing touch events after a stretch

Hey, first of all, great library.

Context: I only imported the ScrollViewHeader code in my project.

I noticed a small glitch that I'm not sure how to go about fixing. After a stretch, touch events stop being recognized on the containing views until the scrollView is scrolled.

My View hierarchy:

ScrollView { 
   VStack { 
      ScrollViewHeader { 
          HeaderView()
                Subview.tapGesture { 
                     print("tapped") // Issue occurs here.
                 }  
      }
   }
}

Issue: The print statement is called without issues unless the ScollViewHeader is pulled and stretched. After a stretch, the touch events are no longer recognized until the scrollView is scrolled down again.

It could be my design but I thought I would check here if someone else had this issue.

Please let me know if you would like more information.

Cheers and thanks again for this library.
Ed

ScrollViewWithStickyHeader doesn't pass 'showsIndicators' to ScrollViewWithOffsetTracking

When setting a ScrollViewWithStickyHeader's 'showsIndicators' to 'false', this value is not passed on to ScrollViewWithOffsetTracking, so it always defaults to showing indicators.

Current version:
var scrollView: some View { GeometryReader { proxy in ScrollViewWithOffsetTracking(onScroll: handleScrollOffset) { VStack(spacing: 0) { scrollHeader content() .frame(maxHeight: .infinity) } } .onAppear { DispatchQueue.main.async { navigationBarHeight = proxy.safeAreaInsets.top } } } }

Should be:
var scrollView: some View { GeometryReader { proxy in ScrollViewWithOffsetTracking(onScroll: handleScrollOffset, showsIndicators: showsIndicators) { VStack(spacing: 0) { scrollHeader content() .frame(maxHeight: .infinity) } } .onAppear { DispatchQueue.main.async { navigationBarHeight = proxy.safeAreaInsets.top } } } }

Question: TabView inside the ScrollViewWithStickyHeader

Congrats on the work! Such a stunning library! It definitely improved my app UI!

Just a question: is it possible to have a TabView (page control) inside the ScrollViewWithStickyHeader header and have all the gestures working?

I want to develop something like that:
Screenshot 2023-12-03 at 23 09 14

`ScrollViewHeader` behaves strangely with presentationDetents

When presenting a sheet with presentation detents, the sticky header functionality breaks a bit because the header tries to grow to the top of the screen, but the presentationDetent cuts it off.

The stretchiness functionality doesn't necessarily need to work on small detents, but would be nice for the header to stick to the top.

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-03-14.at.08.51.58.MP4

Add support for large title

The documentation says "This view enforces .navigationBarTitleDisplayMode(.inline) since a large title doesn’t work with a sticky header.".
Is there a technical limitation?
I can't switch to inline title in my app so it would be great to have large title supported by the lib.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.