UICollectionViewFlowLayout *yLayout = [[UICollectionViewFlowLayout alloc] init]; yLayout.sectionHeadersPinToVisibleBounds = YES; yLayout.sectionFootersPinToVisibleBounds = YES; //return YES;表示一旦滑动就实时调用上面这个layoutAttributesForElementsInRect:方法 - (BOOL) shouldInvalidateLayoutForBoundsChange:(CGRect)newBound { return YES; }
UICollectionView sectionHeader and sectionFooter悬浮
猜你喜欢
转载自www.cnblogs.com/shenlaiyaoshi/p/8933198.html
今日推荐
周排行