danielsaidi / ScrollKit

ScrollKit is a SwiftUI SDK that adds powerful scroll features, like offset tracking and a header view that stretches & transforms as you pull down, and sticks to the top when you scroll.
MIT License
722 stars 26 forks source link

Add axes and showsIndicators to ScrollViewWithSitckyHeader's call for… #14

Closed im-murilo closed 6 months ago

im-murilo commented 7 months ago

Issue: ScrollViewWithStickyHeader is not passing the arguments for 'axes' and 'showsIndicators' to 'ScrollViewWithOffsetTracking' when it calls it.

Fix: Add 'axes' and 'showsIndicators' when calling 'ScrollViewWithOffsetTracking'

danielsaidi commented 6 months ago

Thank you @im-murilo! Just one question, what's that /2 adjustment in the first chunk?

im-murilo commented 6 months ago

I added the adjustment because I noticed that for some sizes of headers the sticky header on top would trigger too early, and dividing that value by two seemed to fix the issue. But tbh I didn't know that that commit was also part of the merge request, this is my first time contributing, I wanted to contribute just the commit 896eb83, the other two were me trying to fix this issue of triggering the sticky header but without any merge-worthy solutions.

danielsaidi commented 6 months ago

Cool, thanks for clarifying. Do you want to adjust your commit so it's removed, or do you think it should be in the project?