-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[ASCollectionView] Pass the Cell Node Through in willDisplayNode: Delegate Method #2282
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* 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 collectionView:willDisplayNode:forItemAtIndexPath: instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is @c here?
@@ -403,6 +404,10 @@ NS_ASSUME_NONNULL_BEGIN | |||
* @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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish there was something we could do to really emphasize this…
* 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 tableView:willDisplayNode:forRowAtIndexPath: instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is @c ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means "print the next word in monospaced font" http://blog.dadabeatnik.com/2013/09/25/comment-docs-in-xcode-5/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, huh, neat!
Let me know when this gets merged to master and I'll bring it to 6.12 |
Thanks @garrettmoon for reviewing! |
This addresses cases where users are calling
waitUntilAllUpdatesAreCommitted
during this callback in order to get the cell node. This practice is unsafe, because you may be editing a collection view while the collection view is calling back to you.Ready for review @maicki @appleguy @hannahmbanana!