In the next chapter, we are going to display the data in our restaurant detail. For now, we want to pass the data over to the detail view.
To make this work, we need to update both our RestaurantDetailViewController (which we have not created yet) and the MapViewController. Let's create the RestaurantDetailViewController:
- Right-click on the new Restaurant Detail 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, add the following:
New file:
-
- Class: RestaurantDetailViewController
- Subclass: UITableViewController
- Also create XIB: Unchecked
- Language: Swift
- Click Next and then Create.
- Delete everything ...