At this point, you have created and configured LocationViewController, which acts as the view controller for this table view. Now, you'll need to create model objects to make the table view display a list of actual locations. Just like you did in the previous chapter, you'll use a .plist file that contains location data, but instead of using an existing .plist file, you'll create one from scratch and add location data to it.
Before you create the .plist file, you'll create an array containing a list of cities and configure LocationViewController to display them in the table view to make sure LocationViewController is working properly. Follow these steps to do so:
- Directly under the tableView property declaration, add the following:
let locations = ["Aspen", "Boston", "Charleston", "...