From 8b7ac3c37dc44e6477680fd445edb4cadfc7dd95 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Tue, 13 Oct 2015 20:45:40 -0700 Subject: [PATCH] Ensure layout controller exposes only cell item index paths to range controller --- AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm b/AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm index cbed7f2bb7..9619cba111 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm +++ b/AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm @@ -137,7 +137,9 @@ typedef struct ASRangeGeometry ASRangeGeometry; NSMutableSet *indexPathSet = [[NSMutableSet alloc] init]; NSArray *layoutAttributes = [_collectionViewLayout layoutAttributesForElementsInRect:rangeBounds]; for (UICollectionViewLayoutAttributes *la in layoutAttributes) { - [indexPathSet addObject:la.indexPath]; + if (la.representedElementCategory == UICollectionElementCategoryCell) { + [indexPathSet addObject:la.indexPath]; + } } return indexPathSet; }