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

Programmatically moved scrollviews jump when floating panel is moved #35

Closed
ffittschen opened this issue Nov 6, 2018 · 3 comments
Closed

Comments

@ffittschen
Copy link
Contributor

As a follow up of the offset changes mentioned at the end of #30, this issue occurs when the content view controller is a scroll view, e.g., a UITableView which gets scrolled programmatically, e.g., by using scrollToRow(at: IndexPath, at: ScrollPosition, animated: Bool).

Expected result

Moving the floating panel, e.g., from .half to .full after using scrollToRow or similar programmatic ways to scroll a scroll view should not cause a change in the contentOffset of the scroll view.
Video

Actual result

Moving the floating panel after using programmatic ways to scroll a scroll view will set the contentOffset to contentOffsetZero causing the content to jump to the top.
Video

Note

Changing the code to achieve the expected result would also cause that manually scrolled scrollviews are not at contentOffsetZero when the floating panel is moved from .full to .half, as mentioned in #30 (comment). But this would align with the behavior of Apple's Maps and Stocks apps.

@scenee
Copy link
Owner

scenee commented Nov 7, 2018

How about my PR #36?

@ffittschen
Copy link
Contributor Author

Just tested it with the code that originally led me to discover this behavior: the PR works fine 👍🏻

@scenee
Copy link
Owner

scenee commented Nov 8, 2018

Thanks, @ffittschen. I really really appreciate your report because it's much clear and helpful. I can fix it soon because of that. Thanks again

@scenee scenee closed this as completed in #36 Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants