How to adjust the spacing between sections of collection view.
You can use the method to implement this:
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
{
//{top, left, bottom, right}
if ([[sectionHeaderStatusArray objectAtIndex:section] boolValue]) {
return UIEdgeInsetsMake(23, 19, 46, 14);
}
return UIEdgeInsetsZero;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With