diff --git a/AsyncDisplayKit/ASCollectionView.h b/AsyncDisplayKit/ASCollectionView.h index ea812839..ca86cf3a 100644 --- a/AsyncDisplayKit/ASCollectionView.h +++ b/AsyncDisplayKit/ASCollectionView.h @@ -301,8 +301,13 @@ NS_ASSUME_NONNULL_BEGIN * @param cellNode a cellNode part of the collection view * * @return an indexPath for this cellNode + * + * @discussion This method will return @c nil for a node that is still being + * displayed in the collection view, if the data source has deleted the item. + * That is, the node is visible but it no longer corresponds + * to any item in the data source and will be removed soon. */ -- (NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode; +- (nullable NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode; /** * Similar to -visibleCells. diff --git a/AsyncDisplayKit/ASTableView.h b/AsyncDisplayKit/ASTableView.h index 74f99e85..f9f41fb5 100644 --- a/AsyncDisplayKit/ASTableView.h +++ b/AsyncDisplayKit/ASTableView.h @@ -278,7 +278,7 @@ NS_ASSUME_NONNULL_BEGIN * * @return a node for display at this indexpath. */ -- (ASCellNode *)nodeForRowAtIndexPath:(NSIndexPath *)indexPath; +- (nullable ASCellNode *)nodeForRowAtIndexPath:(NSIndexPath *)indexPath; /** * Similar to -indexPathForCell:. @@ -286,6 +286,11 @@ NS_ASSUME_NONNULL_BEGIN * @param cellNode a cellNode part of the table view * * @return an indexPath for this cellNode + * + * @discussion This method will return @c nil for a node that is still being + * displayed in the table view, if the data source has deleted the row. + * That is, the node is visible but it no longer corresponds + * to any item in the data source and will be removed soon. */ - (nullable NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode;