Finish Porting indexPath-Oriented Methods to ASTableNode/ASCollectionNode (#2527)

* Finish porting over the indexPath-oriented properties from table/collection view to node

* Make indexPathForSelectedRow a property
This commit is contained in:
Adlai Holler
2016-11-01 15:03:46 -07:00
committed by GitHub
parent e1e5eb6ca0
commit a6e2f8e5ab
10 changed files with 89 additions and 119 deletions

View File

@@ -312,12 +312,12 @@ NS_ASSUME_NONNULL_BEGIN
*
* @return an array containing the nodes being displayed on screen. This must be called on the main thread.
*/
@property(readonly, copy) NSArray<__kindof ASCellNode *> *visibleNodes;
@property (nonatomic, readonly) NSArray<__kindof ASCellNode *> *visibleNodes;
/**
* Retrieves the node for the row at the given index path.
*/
- (nullable ASCellNode *)nodeForRowAtIndexPath:(NSIndexPath *)indexPath AS_WARN_UNUSED_RESULT;
- (nullable __kindof ASCellNode *)nodeForRowAtIndexPath:(NSIndexPath *)indexPath AS_WARN_UNUSED_RESULT;
/**
* Similar to -indexPathForCell:.
@@ -356,7 +356,7 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable __kindof UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath AS_WARN_UNUSED_RESULT;
/**
* Similar to -[UITableView indexPathForSelectedRow]
* Similar to UITableView.indexPathForSelectedRow
*
* @return The value of this property is an index path identifying the row and section
* indexes of the selected row, or nil if the index path is invalid. If there are multiple selections,
@@ -365,7 +365,9 @@ NS_ASSUME_NONNULL_BEGIN
*
* @discussion This method must be called from the main thread.
*/
- (nullable NSIndexPath *)indexPathForSelectedRow AS_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, nullable) NSIndexPath *indexPathForSelectedRow;
@property (nonatomic, readonly, nullable) NSArray<NSIndexPath *> *indexPathsForSelectedRows;
/**
* Similar to -[UITableView indexPathForRowAtPoint:]