Deprecate willDisplayNode:/didEndDisplayingNode: methods

This commit is contained in:
Adlai Holler
2016-06-20 16:40:10 -07:00
parent c129b78318
commit 9873f4bd7d
4 changed files with 80 additions and 28 deletions

View File

@@ -390,19 +390,6 @@ NS_ASSUME_NONNULL_BEGIN
@optional
- (void)tableView:(ASTableView *)tableView willDisplayNodeForRowAtIndexPath:(NSIndexPath *)indexPath;
/**
* Informs the delegate that the table view did remove the provided node from the view hierarchy.
* This may be caused by the node scrolling out of view, or by deleting the row
* or its containing section with @c deleteRowsAtIndexPaths:withRowAnimation: or @c deleteSections:withRowAnimation: .
*
* @param tableView The sender.
* @param node The node which was removed from the view hierarchy.
* @param indexPath The index path at which the node was located before the removal.
*/
- (void)tableView:(ASTableView *)tableView didEndDisplayingNode:(ASCellNode *)node forRowAtIndexPath:(NSIndexPath *)indexPath;
/**
* Receive a message that the tableView is near the end of its data set and more data should be fetched if necessary.
*
@@ -430,14 +417,47 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (BOOL)shouldBatchFetchForTableView:(ASTableView *)tableView;
/**
* Informs the delegate that the table view did remove the provided node from the view hierarchy.
* This may be caused by the node scrolling out of view, or by deleting the row
* or its containing section with @c deleteRowsAtIndexPaths:withRowAnimation: or @c deleteSections:withRowAnimation: .
*
* @param tableView The sender.
* @param node The node which was removed from the view hierarchy.
* @param indexPath The index path at which the node was located before the removal.
*
* @warning AsyncDisplayKit processes table view edits asynchronously. The index path
* passed into this method may not correspond to the same item in your data source
* if your data source has been updated since the last edit was processed.
*
* This method is deprecated. Use @c visibleStateDidChange: on the cell node instead.
*/
- (void)tableView:(ASTableView *)tableView didEndDisplayingNode:(ASCellNode *)node forRowAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED;
/**
* Informs the delegate that the table view did remove the node which was previously
* at the given index path from the view hierarchy.
*
* This method is deprecated. Use @c tableView:didEndDisplayingNode:forRowAtIndexPath: instead.
* @warning AsyncDisplayKit processes table view edits asynchronously. The index path
* passed into this method may not correspond to the same item in your data source
* if your data source has been updated since the last edit was processed.
*
* This method is deprecated. Use @c visibleStateDidChange: on the cell node instead.
*/
- (void)tableView:(ASTableView *)tableView didEndDisplayingNodeForRowAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED;
/**
* Informs the delegate that the table view will add the node
* at the given index path to the view hierarchy.
*
* @warning AsyncDisplayKit processes table view edits asynchronously. The index path
* passed into this method may not correspond to the same item in your data source
* if your data source has been updated since the last edit was processed.
*
* This method is deprecated. Use @c visibleStateDidChange: on the cell node instead.
*/
- (void)tableView:(ASTableView *)tableView willDisplayNodeForRowAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED;
@end
@protocol ASTableViewDelegate <ASTableDelegate>