[ASScrollDirection] Ensure definitions of "positive" scroll direction in batch context match the layout controller.

This commit is contained in:
Scott Goodson
2016-03-08 00:52:14 -08:00
parent 6b74ad75a1
commit 5c28bb8e21
5 changed files with 38 additions and 26 deletions

View File

@@ -60,11 +60,13 @@ typedef struct ASRangeGeometry ASRangeGeometry;
{
NSArray *layoutAttributes = [_collectionViewLayout layoutAttributesForElementsInRect:rangeBounds];
NSMutableSet *indexPathSet = [NSMutableSet setWithCapacity:layoutAttributes.count];
for (UICollectionViewLayoutAttributes *la in layoutAttributes) {
//ASDisplayNodeAssert(![indexPathSet containsObject:la.indexPath], @"Shouldn't already contain indexPath");
ASDisplayNodeAssert(la.representedElementCategory != UICollectionElementCategoryDecorationView, @"UICollectionView decoration views are not supported by ASCollectionView");
[indexPathSet addObject:la.indexPath];
}
return indexPathSet;
}