To see how the data source works, let’s take a look at an example:
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 ...