Deprecate indexPath-based Methods on ASTableView/ASCollectionView (#2498)

* Deprecated indexPath methods in ASTableView and ASTableNode and added several indexPath methods to ASTableNode and ASCollectionNode.

* Fixed incorrect doc.
Removed unnecessary __kindof.
This commit is contained in:
george-gw
2016-10-29 18:50:11 +02:00
committed by Adlai Holler
parent c4451edab1
commit d83f058f82
10 changed files with 257 additions and 62 deletions

View File

@@ -375,6 +375,24 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (NSArray<__kindof NSIndexPath *> *)indexPathsForVisibleItems AS_WARN_UNUSED_RESULT;
/**
* Retrieve the index path of the item at the given point.
*
* @param point The point of the requested item.
*
* @return The indexPath for the item at the given point. This must be called on the main thread.
*/
- (nullable NSIndexPath *)indexPathForItemAtPoint:(CGPoint)point AS_WARN_UNUSED_RESULT;
/**
* Retrieve the cell at the given index path.
*
* @param indexPath The index path of the requested item.
*
* @return The cell for the given index path. This must be called on the main thread.
*/
- (nullable UICollectionViewCell *)cellForItemAtIndexPath:(NSIndexPath *)indexPath;
/**
* Retrieves the context object for the given section, as provided by the data source in
* the @c collectionNode:contextForSection: method.