mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Added node access methods to ASTableView, ASCollectionView.
This commit is contained in:
@@ -198,6 +198,24 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
_layoutController.tuningParameters = tuningParameters;
|
||||
}
|
||||
|
||||
- (ASCellNode *)nodeForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return [_dataController nodeAtIndexPath:indexPath];
|
||||
}
|
||||
|
||||
- (NSArray *)visibleNodes
|
||||
{
|
||||
NSArray *indexPaths = [self indexPathsForVisibleRows];
|
||||
NSMutableArray *visibleNodes = [[NSMutableArray alloc] init];
|
||||
|
||||
[indexPaths enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
ASCellNode *visibleNode = [self nodeForRowAtIndexPath:obj];
|
||||
[visibleNodes addObject:visibleNode];
|
||||
}];
|
||||
|
||||
return visibleNodes;
|
||||
}
|
||||
|
||||
#pragma mark Assertions.
|
||||
|
||||
- (void)throwUnimplementedException
|
||||
|
||||
Reference in New Issue
Block a user