As discussed in the previous chapter, we need to add a data source and delegate to our Table View. Table View uses dynamic cells, which we are required to add:
- Select Table View in the Outline view, and then Connections inspector in the Utilities Panel.
- Click on and drag from dataSource to the Location View Controller in the Outline view:
- Repeat with the delegate property:
- Now, select the Table View and then in the Utilities Panel, select the Attributes inspector, if not already selected, and make sure you have the following values:
-
- Style: Basic
- Identifier: locationCell (named for you)
- Selection: Gray
- Accessory: Disclosure indicator
Next, for us to display anything in Tableview, we need to add the UITableViewDataSource protocol. Our protocol requires that we implement the following three methods. Add the following after the closing...