-
Notifications
You must be signed in to change notification settings - Fork 220
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
Reloading collectionview does not maintain content offset #56
Comments
The problem is still relevant, is there any solution? |
We're experiencing this issue as well. Any time a reload occurs when the collection view is scrolled, its |
I am also experiencing this issue. Whenever a reload happens, when the collection view is scrolled, its contentOffset change, resulting in the jump. @bryankeller is there any known fix/solution for the same? |
Seems like once we scroll the view and then on reload of data content size of collection view is not same as before even though data is same. Self sizing return different content size each time. I also looked into the item size returned in method @bryankeller does any one looking into this issue? |
This issue occurs in UICollectionView usually when implementing self-sizing cells but there are workarounds to get past it. Unfortunately the UICollectionViewDelegateFlowLayout methods we conform to in order to perform the workaround are not accessible when using MagazineLayout. Is there any possibility we can get a fix for this within MagazineLayout? |
use |
Good news! My PR is merged into the master branch. #113
|
Describe the bug
When
reloadData()
is called, thecollectionView
sometimes doesn't preserve the scrolling position, causing the collectionView to jump abruptlyTo Reproduce
Steps to reproduce the behavior:
MagazineLayoutExample
Note: this doesn't occur every time, you need to adjust scrolling position before reloading the data if you cannot reproduce it at the beginning
Expected behavior
The screen should maintain its position after reloading data
Screenshots
Smartphone (please complete the following information):
Additional context
Not sure if this could be a bug in UICollectionView rather than MagazineLayout, please advise.
The text was updated successfully, but these errors were encountered: