Now that we understand Table View more, we want to get locations displaying inside our Table View:
Before we start, create three new folders inside the Location folder – Controller, View, and Model. As we have previously done, right-click on the Location folder and hit New Group to create a new folder.
Next, we need to create a Location View Controller class that we can use with our UIViewController:
- Right-click on the Locations folder inside of Controllers and select New File.
- In the Choose a template for your new file screen, select iOS at the top and then Cocoa Touch Class. Then, hit Next.
- In the Options screen that appears, add the following file after New file:
-
- Class: LocationViewController
- Subclass: UIViewController
- Also create XIB: Unchecked
- Language: Swift
- Click on Next and then Create.
Next, we need to connect...