Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate the need to adjust scroll position #4

Open
wtmoose opened this issue Jan 30, 2024 · 0 comments
Open

Eliminate the need to adjust scroll position #4

wtmoose opened this issue Jan 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@wtmoose
Copy link
Member

wtmoose commented Jan 30, 2024

It may be possible to adjust the safe area padding instead of the scroll position, which would significantly simplify the API. However, this requires frame-by-frame tracking of scroll view parameters. The SwiftUI method for tracking content offset doesn't seem to provide that frame-by-frame accuracy in my experimentation. Specifically, if one adjusts the safe area padding of a scroll view, there should be an automatic equal and opposite adjustment to the content offset to maintain spatial consistent of the effective scroll position. However, using the SwiftUI technique for tracking the content offset, those adjustments are not being observed in a consistent, predictable pattern, making it impossible to have the header fluidly track the scroll. However, by delving into UIKit, it may be to track these parameters accurately at every frame.

@wtmoose wtmoose added the enhancement New feature or request label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant