Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Table views describe their layouts in terms of instances of the NSIndexPath class. Technically, these are representations of paths to nodes within a collection of nested arrays.
However, that’s an extremely complicated description of what NSIndexPath objects are in the context of tableViews, so I’d stick to thinking of them in much more simple terms. As far as a tableView is concerned, an indexPath has two properties: a section and a row, shown in Figure 3–6. Both of these are instances of NSUIntegers.
Figure 3–6. indexPath sections and rows
As you can see, the table uses indexPaths to identify sections and rows. The iPhone Simulator is running Apple’s The Elements sample code, and it’s scrolled down to the elements beginning with the letter D.