Cell size is determined by the collection layout object. Are you UICollectionViewFlowLayout ? Try either setting the itemSize property of the layout object or implementing the delegation method: collectionView:layout:sizeForItemAtIndexPath:
You can specify the size of the element (cell) relative to the boundaries of the collection view.
Keep in mind that you also need to customize the collection view so that it changes using your view controller. If you are using a UICollectionViewController that should be configured automatically. Otherwise, you will have to restrain viewing the collection to the limits of your supervisor.
Update:
You can set the itemSize property of the layout directly to the layout:
self.layout.itemSize = CGSizeMake(CGRectGetWidth(self.collectionView.bounds), 100);
or (better if you are handling rotation or resizing), make the appropriate delegate call:
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { return CGSizeMake(CGRectGetWidth(collectionView.bounds), 100); }
I would recommend reading the relevant UICollectionView to learn more about how collection views and their layout work:
John grant
source share