美文网首页
iOS UICollectionView设置分区头header、

iOS UICollectionView设置分区头header、

作者: Eyes_cc | 来源:发表于2020-04-14 14:13 被阅读0次

在iOS9.0后UICollectionView的分区头header也能像tableView的分区头header一样实现悬浮挂住的效果:

 UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
 //header
 flowLayout.sectionHeadersPinToVisibleBounds = YES;
 //footer
 flowLayout.sectionFootersPinToVisibleBounds = YES;

相关文章

网友评论

      本文标题:iOS UICollectionView设置分区头header、

      本文链接:https://www.haomeiwen.com/subject/cgazmhtx.html