有些需要组头和组尾的高度不同,在layout中设置导置所有的组头和组尾的高都一样,刚做了个项目正好有这个需要,代码如下
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section{
if (section == 0) {
return CGSizeMake([UIScreen mainScreen].bounds