O'Reilly logo

The Complete Idiot's Guide® To iPad and iPhone App Development by Troy Brant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An Example

To see how the data source works, let’s take a look at an example:
329
330
The preceding code will create a table with two sections and four total rows. The rows themselves will either display “Row 0” or “Row 1”, the same as in the table view image shown earlier. tableView:cellForRowAtIndexPath: is called four times, once for each row in the table.

Table Cell Styles

In the previous code, the cell is initialized using the default style. There are actually four styles to choose from, and you can see the differences between them in the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required