From 4199d852cc5af18cf2550cc1f4d2d1eb05808fe0 Mon Sep 17 00:00:00 2001 From: wimbledon Date: Sun, 8 Jun 2014 23:46:45 +0900 Subject: [PATCH] header's zIndex Make sure the supplementary header shows on top of all collectionView cells. --- CHTCollectionViewWaterfallLayout.m | 1 + 1 file changed, 1 insertion(+) diff --git a/CHTCollectionViewWaterfallLayout.m b/CHTCollectionViewWaterfallLayout.m index e6c280f..223445c 100644 --- a/CHTCollectionViewWaterfallLayout.m +++ b/CHTCollectionViewWaterfallLayout.m @@ -229,6 +229,7 @@ - (void)prepareLayout { if (headerHeight > 0) { attributes = [UICollectionViewLayoutAttributes layoutAttributesForSupplementaryViewOfKind:CHTCollectionElementKindSectionHeader withIndexPath:[NSIndexPath indexPathForItem:0 inSection:section]]; attributes.frame = CGRectMake(0, top, self.collectionView.frame.size.width, headerHeight); + attributes.zIndex = 100; self.headersAttribute[@(section)] = attributes; [self.allItemAttributes addObject:attributes];