Beef up documentation around new delegate methods

This commit is contained in:
Adlai Holler 2016-01-12 23:27:30 -07:00
parent 5e72daa2e3
commit d19e56d802
2 changed files with 27 additions and 2 deletions

View File

@ -376,6 +376,16 @@ NS_ASSUME_NONNULL_BEGIN
@optional
- (void)collectionView:(ASCollectionView *)collectionView willDisplayNodeForItemAtIndexPath:(NSIndexPath *)indexPath;
/**
* Informs the delegate that the collection 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 item
* or its containing section with @c deleteItemsAtIndexPaths: or @c deleteSections: .
*
* @param collectionView 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 it was removed.
*/
- (void)collectionView:(ASCollectionView *)collectionView didEndDisplayingNode:(ASCellNode *)node forItemAtIndexPath:(NSIndexPath *)indexPath;
/**
@ -407,7 +417,10 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)shouldBatchFetchForCollectionView:(ASCollectionView *)collectionView;
/**
* Use `collectionView:didEndDisplayingNode:forItemAtIndexPath:` instead.
* Informs the delegate that the collection view did remove the node which was previously
* at the given index path from the view hierarchy.
*
* This method is deprecated. Use @c collectionView:didEndDisplayingNode:forItemAtIndexPath: instead.
*/
- (void)collectionView:(ASCollectionView *)collectionView didEndDisplayingNodeForItemAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED;

View File

@ -337,6 +337,15 @@ NS_ASSUME_NONNULL_BEGIN
- (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;
/**
@ -367,7 +376,10 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)shouldBatchFetchForTableView:(ASTableView *)tableView;
/**
* Use `tableView:didEndDisplayNode:forRowAtIndexPath` instead.
* 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.
*/
- (void)tableView:(ASTableView *)tableView didEndDisplayingNodeForRowAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED;