Reputation: 1416
My project has a UICollectionView with a custom cell that used to work perfectly on iPhone and iPad before iOS8. Now in iPad on first load cells look perfect but on rotation
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
does not get called.
Problem is this is where my rotation logic goes and that's why my UICollectionView twitches.
Upvotes: 4
Views: 337
Reputation: 1416
Here is what solved it: I added the bottom line to my didRotateFromInterfaceOrientation: method
-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
[self.collectionView performBatchUpdates:nil completion:nil];
}
Upvotes: 1