Provide ASCollectionView::calculatedSizeForNodeAtIndexPath:, to be used in custom UICollectionViewLayouts.

This commit is contained in:
Huy Nguyen 2014-11-11 19:53:10 +02:00
parent 3642d5773a
commit c42d41fb4c
2 changed files with 12 additions and 0 deletions

View File

@ -67,6 +67,13 @@
*/ */
- (void)appendNodesWithIndexPaths:(NSArray *)indexPaths; - (void)appendNodesWithIndexPaths:(NSArray *)indexPaths;
/**
* Query the sized node at `indexPath` for its calculatedSize.
*
* @param indexPath The index path for the node of interest.
*/
- (CGSize)calculatedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath;
@end @end

View File

@ -170,6 +170,11 @@ static BOOL _isInterceptedSelector(SEL sel)
[_rangeController appendNodesWithIndexPaths:indexPaths]; [_rangeController appendNodesWithIndexPaths:indexPaths];
} }
- (CGSize)calculatedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath
{
return [_rangeController calculatedSizeForNodeAtIndexPath:indexPath];
}
#pragma mark Assertions. #pragma mark Assertions.
- (void)throwUnimplementedException - (void)throwUnimplementedException