Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android
by Jakob Iversen, Michael Eierman
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access