I'm using a horizontally, paging UICollectionView
to display a variable number of collection view cells. The size of each collection view cell needs to be equal to that of the collection view and whenever the size of the collection view changes, the size of the collection view cells need to update accordingly. The latter is causing issues. The size of the collection view cells is not updated when the size of the collection view changes.
Invalidating the layout doesn't seem to do the trick. Subclassing UICollectionViewFlowLayout
and overriding shouldInvalidateLayoutForBoundsChange:
doesn't work either.
For your information, I'm using an instance of UICollectionViewFlowLayout
as the collection view's layout object.
UIScrollView
. This has given me more control over the behavior of the collection view, which is what I needed for this project. – Bart Jacobs