Inside my View Layout collection (subclass of UICollectionViewFlowLayout ) I defined:
- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds { return YES; }
My expectation is that since the rotation is a change of boundaries, my layout will be recounted. However, when I set a breakpoint at:
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
The breakpoint does not start when the screen rotates. Does anyone know why?
ios uikit ios8 uicollectionview
Andrew Lauer Barinov
source share