Pass node along in didEndDisplayingNode method

This commit is contained in:
Adlai Holler
2016-01-12 15:42:37 -07:00
parent 516e1f177d
commit 5e72daa2e3
4 changed files with 31 additions and 3 deletions

View File

@@ -598,9 +598,18 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
[_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:self.scrollDirection];
if ([_asyncDelegate respondsToSelector:@selector(tableView:didEndDisplayingNode:forRowAtIndexPath:)]) {
ASCellNode *node = ((_ASTableViewCell *)cell).node;
ASDisplayNodeAssertNotNil(node, @"Expected node associated with removed cell not to be nil.");
[_asyncDelegate tableView:self didEndDisplayingNode:node forRowAtIndexPath:indexPath];
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([_asyncDelegate respondsToSelector:@selector(tableView:didEndDisplayingNodeForRowAtIndexPath:)]) {
[_asyncDelegate tableView:self didEndDisplayingNodeForRowAtIndexPath:indexPath];
}
#pragma clang diagnostic pop
}