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

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -