UICollection View Adjust Cell Size for Screen Size UICollection View Adjust Cell Size for Screen Size ios ios

UICollection View Adjust Cell Size for Screen Size


You can either use the UICollectionViewFlowLayout method itemSize property to set the UICollectionViewCell size, or use the delegate method, collectionView:layout:sizeForItemAtIndexPath: if you need to dynamically set the sizes of the UICollectionViewCells.


CollectionView layout Delegate that will help you to resize your Cell as you need.
- (CGSize)collectionView:(UICollectionView *)collectionView                           layout:(UICollectionViewLayout*)collectionViewLayout           sizeForItemAtIndexPath:(NSIndexPath *)indexPath;


matomo