Address pull request comments

This commit is contained in:
Michael Schneider
2016-03-16 10:35:53 -07:00
parent d3ba80ccfd
commit 19232ac493
3 changed files with 16 additions and 11 deletions

View File

@@ -919,14 +919,15 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
{
ASCollectionNode *collectionNode = self.collectionNode;
if (collectionNode && [collectionNode supportsRangeManagedInterfaceState]) {
// Only use the interfaceStatate of nodes that are range managed
// Only use the interfaceState of nodes that are range managed
return collectionNode.interfaceState;
} else {
// For not range managed nodes or until we can always create an associated ASCollectionNode
// without a retain cycle, we might be on our own to try to guess if we're visible. The node normally
// handles this even if it is the root / directly added to the view hierarchy.
return (self.window != nil ? ASInterfaceStateVisible : ASInterfaceStateNone);
}
// For not range managed nodes or until we can always create an associated ASCollectionNode
// without a retain cycle, we might be on our own to try to guess if we're visible. The node normally
// handles this even if it is the root / directly added to the view hierarchy.
return (self.window != nil ? ASInterfaceStateVisible : ASInterfaceStateNone);
}
- (NSArray *)rangeController:(ASRangeController *)rangeController nodesAtIndexPaths:(NSArray *)indexPaths