Reputation: 6275
I have an UICollectionView
where the items can modify at run time it's height.
The problem is that when an item is higher than another, the item are surrounded by a lot o blank space.
I'm looking for a property that create this:
and I want use UICollectionView
not github example or third part implementation.
Thanks.
Upvotes: 4
Views: 793
Reputation: 34
I don't believe UICollectionViewFlowLayout
behaves this way. Try to reload your collection view after modifying the height or returning a different value for that cell in collectionView:layout:sizeForItemAtIndexPath:
and see if the gap fills. Otherwise, I'd recommend using a custom UICollectionViewLayout
subclass.
This class might fit this purpose properly - a UICollectionViewLayout subclass to work with your collection view: https://github.com/aceisScope/WaterflowView/blob/master/WaterFlowDisplay/WaterFlowLayout.h
Upvotes: 1