Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is [NSIndexPath row] documented?

Can anyone point me to where [indexPath row] is described in the documentation, I have looked at NSIndexPath but I can't find any mention of "row"? I am assuming its an NSUInteger, but I would also like to double check its type and see what other properties are available.

Example:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NSUInteger currentRow = [indexPath row];
}

cheers Gary

like image 732
fuzzygoat Avatar asked Sep 14 '10 10:09

fuzzygoat


3 Answers

The .row property is part of the extension category defined in UIKit.

The doc is in https://developer.apple.com/reference/foundation/nsindexpath/1614853-row (row) and https://developer.apple.com/reference/foundation/nsindexpath/1528298-section (section).

row

An index number identifying a row in a section of a table view. (read-only)

@property(readonly) NSUInteger row

Discussion

The section the row is in is identified by the value of section.


The Swift counterpart: https://developer.apple.com/reference/foundation/indexpath/1779554-row (row) and https://developer.apple.com/reference/foundation/indexpath/1779112-section (section).

These Swift properties are of type Int.

like image 62
kennytm Avatar answered Nov 15 '22 14:11

kennytm


It's in the NSIndexPath(UITableView) documentation.

like image 37
jer Avatar answered Nov 15 '22 14:11

jer


It's a UIKit addition, which is documented separately. You're correct in that it's an NSUInteger.

like image 42
BoltClock Avatar answered Nov 15 '22 12:11

BoltClock