views:

73

answers:

3

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

+4  A: 

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

The doc is in http://developer.apple.com/library/ios/#documentation/UIKit/Reference/NSIndexPath_UIKitAdditions/Reference/Reference.html.

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.

KennyTM
+1  A: 

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

BoltClock
Yeah, and for some reason those UIKit additions' docs are really hard to find. I'm always looking for the exact spelling of the string drawing-size methods in there. Xcode won't autocomplete them, and it always takes me some hunting to find that darn document.
Dan Ray
+1  A: 

It's in the NSIndexPath(UITableView) documentation.

jer