在iOS9.0后UICollectionView的分区头header也能像tableView的分区头header一样实现悬浮挂住的效果:
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
//header
flowLayout.sectionHeadersPinToVisibleBounds = YES;
//footer
flowLayout.sectionFootersPinToVisibleBounds = YES;
网友评论