![](https://i-blog.csdnimg.cn/blog_migrate/680f9b096575d27422920cd600be40a9.webp?x-image-process=image/format,png)
github 地址github.com/Wanghongchao12138/CustomerCollectionView
/* 设置cell 的宽高 */
(CGFloat)collectionView:(UICollectionView)collectionView layout:(WHCWaterfallFlowLayout)collectionViewLayout heightForWidth:(CGFloat)width atIndexPath:(NSIndexPath*)indexPath;
/* 设置collection 的头视图的size */
(CGSize)collectionView:(UICollectionView)collectionView layout:(WHCWaterfallFlowLayout)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section;
/* 设置collection footer 视图的size */
(CGSize)collectionView:(UICollectionView)collectionView layout:(WHCWaterfallFlowLayout)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section;
-- colCount -- 设置CollectionView 的cell 的列数 -- sectionInset -- 设置cell 的间距