I have a UICollectionView
, using the basic flow layout. I've implemented the insetForSectionAtIndex
method, returning a UIEdgeInsets
with top and bottom insets, as well as the left and right:
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
return UIEdgeInsetsMake(2.0f, 2.0f, 2.0f, 2.0f);
}
The result is that there is 2.0f "padding" on the left and right of each cell, but no "padding" on the top and bottom. It's flush (0.0f). What am I missing?
Thanks.