consists of a vertical list of
Each section consists of a vertical list of
and maybe also an
such as a
(shaped like a
To see the classic table,
open the Settings app on your iPhone.
To identify a cell in a table view we must specify its section number, and its row number within that section. Both numbers are zero-based. For example, the first cell in the first section is (0, 0). A table view that is not divided into sections is treated as one big section whose section number is 0.
object contains a pair of
giving the section number and row number of a
For the time being, we will put only two numbers into an
a later example
will exploit the fact that an
can hold more than two numbers.
When we write them, they are conventionally separated by periods:
This series of numbers would be used by apps like the Settings app,
where we navigate from table to table to table.
As we drill deeper, the index path gets longer.
AppDelegate. I wrote the entire demonstration in the
section = 20 row = 10 index 0 = 10 index 1 = 20 index 2 = 30 index 3 = 40 index 4 = 50 index 0 = 10 index 1 = 20 index 2 = 30 index 3 = 40 index 4 = 50 index 5 = 60