I am having similar problem like this
I am generating height of view at run time.Here is my code
@interface CollectionViewController ()
{
NSMutableAr
You can set the size with a property:
flowLayout.headerReferenceSize = CGSizeMake(0, 100);//constant height for all the items header
If Dynamic :
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section {
if (section == albumSection) {
return CGSizeMake(0, 100);
}
return CGSizeZero;
}