Creating the LocationViewController class
As shown in the app tour in Chapter 9, Setting Up the User Interface, the Locations screen displays a list of locations in a table view. At the end of Chapter 12, Modifying and Configuring Cells, you configured the Locations screen to display a table view and set the identifier of the table view cells to locationCell
. Referring to the Model-View-Controller (MVC) design pattern, you have completed the required views, but you haven't completed the controller or the model yet.
At the point when you click the LOCATION button in the Explore screen, an empty table view is displayed:
You will create the LocationViewController
class as the view controller for the Locations screen, add an outlet for the table view to it, and configure it as the table view's data source and delegate. Follow these steps:
- Open your
LetsEat
project...