自定义瀑布流(可添加自定义header和footer)



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 的间距

相关文章:

  • 2021-10-08
  • 2021-08-30
  • 2023-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2021-09-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-03-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案