Seems obvious when you use it but this can be a little puzzling.
Firstly, there is now row or item property on NSIndexPath. So, what’s going on?
If you take a closer look at the NSIndexPath documentation you’ll see that iOS adds the row and item properties in UIKit.
Note: iOS adds programming interfaces to the NSIndexPath class of the Foundation framework to facilitate the identification of rows and sections in UITableView objects. The API consists of a class method and two properties. The indexPathForRow:inSection: method creates an NSIndexPath object from row and section index numbers. The properties return the row index number and the section index number from such objects. See NSIndexPath UIKit Additions for details.
And these class methods and properties are:
Creating an Index Path Object:
Getting the Section Index:
Getting the Index of a Row or Item