objective c - iOS8 Xcode6 UICollectionView sizeForIndexPath: does not get called on rotation -
my project has uicollectionview custom cell used work on iphone , ipad before ios8. in ipad on first load cells perfect on rotation
- (cgsize)collectionview:(uicollectionview *)collectionview layout:(uicollectionviewlayout*)collectionviewlayout sizeforitematindexpath:(nsindexpath *)indexpath
does not called.
problem rotation logic goes , that's why uicollectionview twitches.
here solved it: added bottom line didrotatefrominterfaceorientation: method
-(void)didrotatefrominterfaceorientation:(uiinterfaceorientation)frominterfaceorientation{ [super didrotatefrominterfaceorientation:frominterfaceorientation]; [self.collectionview performbatchupdates:nil completion:nil];
}
Comments
Post a Comment