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
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
.
It's in the NSIndexPath(UITableView)
documentation.
It's a UIKit addition, which is documented separately. You're correct in that it's an NSUInteger
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With