ios - Dynamically change cell spacing UICollectionView -


was having issues uicollectionview , spacing of cells. figured out how change spacing , works portrait view not landscape view. tried differentiate:

//set minimum spacing if(uideviceorientationislandscape([uidevice currentdevice].orientation)){      layout.minimumlinespacing = 100.0f; } else{      layout.minimumlinespacing = 40.0f; } 

but unfortunately doesn't change when switch portrait landscape. can tell me how can achieve this?

try

- (void)didrotatefrominterfaceorientation:(uiinterfaceorientation)frominterfaceorientation {     [yourcollectionview performbatchupdates:nil completion:nil]; } 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

c# SetCompatibleTextRenderingDefault must be called before the first -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -