klundberg / KRLCollectionViewGridLayout

A UICollectionViewLayout that specifies item size and location by number of columns.
MIT License
164 stars 23 forks source link

Content Size not changing after reload #9

Closed LinusGeffarth closed 6 years ago

LinusGeffarth commented 6 years ago

First off, thanks for this awesome library. This is how the default layout should work!

Now, I'm experiencing the following issue: When reloading data and displaying less cells than before, the content size does not change and I'm left with a way too high collection view. The only solution I found does not work with this layout.

I tried to do things like:

collectionView.collectionViewLayout.invalidate()
collectionView.collectionViewLayout.prepare()
collectionView.reloadData()

...but without any luck.

Any ideas?

LinusGeffarth commented 6 years ago

This was a mistake in my implementation, sorry!