[iPhone SDK] NSIndexPath from Row number?

Getting a 'cell' from a row index was certainly possible with the open iphone SDK. However with the iPhone SDK, I can't seem to get a Cell with a mere Row Index. I guess the closest I need is a NSIndexPath from a row index but there seems to be no such way.
Either that or I manually construct a NSIndexPath. Is that possible?

If you've created a table that has only a single section, then according to the documentation
[NSIndexPath indexPathForRow: rownumber inSection: 0]
will do it.
I hadn't come across this until I was answering this question, so I've been using
{NSUInteger indexes[2]={0,rownumber};
NSIndexPath * indexPath=[NSIndexPath indexPathWithIndexes:indexes length:2];
and this definitely works.

Similar Messages

Maybe you are looking for