1. 头视图大小
layout.headerReferenceSize = CGSizeMake(375, 200);
// 注册头视图
[self.collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"headerReuse"];
// 设置表头和区域内容
-(UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
UICollectionReusableView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"headerReuse" forIndexPath:indexPath];
headerView.backgroundColor = [UIColor cyanColor];
headerView.userInteractionEnabled = YES;
return headerView;
}