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

Cell height not updating, when inserting new cell #26

Open
chanonly123 opened this issue Mar 17, 2018 · 2 comments
Open

Cell height not updating, when inserting new cell #26

chanonly123 opened this issue Mar 17, 2018 · 2 comments

Comments

@chanonly123
Copy link

I saved the heights of cells in data models and its working perfectly. When inserting a new cell, heights of visible cells are changed to next model. Again when the cells are scrolled out of view, and reenter then the are updated correctly. However default UICollectionViewFlowLayout has no issues.

@clementleysbetclic
Copy link

clementleysbetclic commented Feb 12, 2019

Hi, I have the same problem. When I reload a section, cells data are updated, sizeForItem is called and returns the right height but the cell is not updated until I scroll.
I tried to call invalidateLayout(), prepare(), setNeedsLayout() on the cell, but nothing works.
The only way it could work is to create a new BouncyLayout instance and set the collectionView layout again. But it is not a good solution, I don't want to set it each time I reload.

@chanonly123 did you find a solution ?

Thank you.

@chanonly123
Copy link
Author

Didn't find any solution. And your solution is good I think.

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