iOS Orientation UICollectionView -
my collectionview presents 20 items in landscape mode. in portrait mode, want 8 reusable items presented. how can achieve this?
when collectionview call collectionview:numberofitemsinsection: on data source in order update itself???
you need force application change layout of collection view when changing orientation:
-(void)willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration{ [self.mycollectionview.collectionviewlayout invalidatelayout]; }
see thread: uicollectionview set number of columns
good luck!
Comments
Post a Comment