Populate the Table with Data

A table without data isn’t very exciting, so the next task is to have some data show up in the table. Switch to LMAContactsTableController.m and scroll down until you see several premade methods related to the table. These are all methods that are declared in UITableViewDelegate and UITableViewDataSource. The Table Controller is a subclass of UITableViewController, which conforms to these two protocols, so the template added all the required methods from those protocols.

The system will make calls to the delegate methods as it needs to work with the table, so most of your work in setting up a table is to implement the methods in the two protocols. Throughout the rest of this chapter, you see how to use several of ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.