Change ASTableView's visibleNodes interface to return array of ASCellNodes (#1666)

This commit is contained in:
Rocir Santiago
2016-05-21 23:10:12 -07:00
committed by appleguy
parent 4ac2d52a06
commit e8a49b57bc
2 changed files with 4 additions and 4 deletions

View File

@@ -285,9 +285,9 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Similar to -visibleCells.
*
* @returns an array containing the nodes being displayed on screen.
* @returns an array containing the cell nodes being displayed on screen.
*/
- (NSArray<ASDisplayNode *> *)visibleNodes;
- (NSArray<ASCellNode *> *)visibleNodes;
/**
* YES to automatically adjust the contentOffset when cells are inserted or deleted "before"

View File

@@ -389,11 +389,11 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
return [_dataController indexPathForNode:cellNode];
}
- (NSArray *)visibleNodes
- (NSArray<ASCellNode *> *)visibleNodes
{
NSArray *indexPaths = [self visibleNodeIndexPathsForRangeController:_rangeController];
NSMutableArray *visibleNodes = [NSMutableArray array];
NSMutableArray<ASCellNode *> *visibleNodes = [NSMutableArray array];
for (NSIndexPath *indexPath in indexPaths) {
ASCellNode *node = [self nodeForRowAtIndexPath:indexPath];
if (node) {