Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit d19e56d

Browse files
committed
Beef up documentation around new delegate methods
1 parent 5e72daa commit d19e56d

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

AsyncDisplayKit/ASCollectionView.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,16 @@ NS_ASSUME_NONNULL_BEGIN
376376
@optional
377377

378378
- (void)collectionView:(ASCollectionView *)collectionView willDisplayNodeForItemAtIndexPath:(NSIndexPath *)indexPath;
379+
380+
/**
381+
* Informs the delegate that the collection view did remove the provided node from the view hierarchy.
382+
* This may be caused by the node scrolling out of view, or by deleting the item
383+
* or its containing section with @c deleteItemsAtIndexPaths: or @c deleteSections: .
384+
*
385+
* @param collectionView The sender.
386+
* @param node The node which was removed from the view hierarchy.
387+
* @param indexPath The index path at which the node was located before it was removed.
388+
*/
379389
- (void)collectionView:(ASCollectionView *)collectionView didEndDisplayingNode:(ASCellNode *)node forItemAtIndexPath:(NSIndexPath *)indexPath;
380390

381391
/**
@@ -407,7 +417,10 @@ NS_ASSUME_NONNULL_BEGIN
407417
- (BOOL)shouldBatchFetchForCollectionView:(ASCollectionView *)collectionView;
408418

409419
/**
410-
* Use `collectionView:didEndDisplayingNode:forItemAtIndexPath:` instead.
420+
* Informs the delegate that the collection view did remove the node which was previously
421+
* at the given index path from the view hierarchy.
422+
*
423+
* This method is deprecated. Use @c collectionView:didEndDisplayingNode:forItemAtIndexPath: instead.
411424
*/
412425
- (void)collectionView:(ASCollectionView *)collectionView didEndDisplayingNodeForItemAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED;
413426

AsyncDisplayKit/ASTableView.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,15 @@ NS_ASSUME_NONNULL_BEGIN
337337

338338
- (void)tableView:(ASTableView *)tableView willDisplayNodeForRowAtIndexPath:(NSIndexPath *)indexPath;
339339

340+
/**
341+
* Informs the delegate that the table view did remove the provided node from the view hierarchy.
342+
* This may be caused by the node scrolling out of view, or by deleting the row
343+
* or its containing section with @c deleteRowsAtIndexPaths:withRowAnimation: or @c deleteSections:withRowAnimation: .
344+
*
345+
* @param tableView The sender.
346+
* @param node The node which was removed from the view hierarchy.
347+
* @param indexPath The index path at which the node was located before the removal.
348+
*/
340349
- (void)tableView:(ASTableView *)tableView didEndDisplayingNode:(ASCellNode *)node forRowAtIndexPath:(NSIndexPath *)indexPath;
341350

342351
/**
@@ -367,7 +376,10 @@ NS_ASSUME_NONNULL_BEGIN
367376
- (BOOL)shouldBatchFetchForTableView:(ASTableView *)tableView;
368377

369378
/**
370-
* Use `tableView:didEndDisplayNode:forRowAtIndexPath` instead.
379+
* Informs the delegate that the table view did remove the node which was previously
380+
* at the given index path from the view hierarchy.
381+
*
382+
* This method is deprecated. Use @c tableView:didEndDisplayingNode:forRowAtIndexPath: instead.
371383
*/
372384
- (void)tableView:(ASTableView *)tableView didEndDisplayingNodeForRowAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED;
373385

0 commit comments

Comments
 (0)