Next, let's set up the table view on the second controller. We are using a powerful class on iOS called
UITableView. It is used in many situations and is very similar to the concept of a list view on other platforms. The
UITableView class is controlled by another class called
UITableViewSource. It has methods that you need to override to set up how many rows should exist and how those rows should be displayed on the screen.
UITableViewSource is a combination of
UITableViewDataSource. I prefer to use
UITableViewSource for simplicity, since using both of the other two classes would often be required.
Before we jump in and start coding, let's review the most commonly used methods on