Home > Technologies, iPhone SDK > Undocumented Methods in NSIndexPath – Row, Section

Undocumented Methods in NSIndexPath – Row, Section

Did you know that the NSIndexPath object apparently has undocumented properties / methods? I’m working on a hobby iPhone OS Application that I hope to release and I’ve been trying to figure out how to use the instances of indexPath provided by: tableView:cellForRowAtIndexPath:

Full protocol:

1
2
tableView:(UITableView *)tableView
    cellForRowAtIndexPath:(NSIndexPath *)indexPath

I was flipping though my iPhone Dev book and was reminded that we have a section method in the instances of indexPath. I just wanted to post this here because this is (at this time) not on apple’s documentation.

Thus far, there are two that I want to mention: section and row.  Both of these most iPhone developers will know about… except if you are new at this… Then this can be perplexing…

1
2
    NSUInteger section = [indexPath section];
    NSUInteger row = [indexPath row];
  • Delicious
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • Twitter
  1. No comments yet.
  1. No trackbacks yet.