IOS8 Xcode6 UICollectionView sizeForIndexPath: not called on rotation

My project has a UICollectionView with a custom cell that worked fine on iPhone and iPad prior to iOS8. Now the iPad on the first load cells look perfect, but when rotated

- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath

not called.

The problem is that my rotation logic is on and why my UICollectionView is twitching.

+4
source share
1 answer

Here's what he decided: I added the bottom line to my didRotateFromInterfaceOrientation: method

-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
[self.collectionView performBatchUpdates:nil completion:nil];

}

+1
source

All Articles