Restaurant details

In order to show data in Restaurant Details, we must first pass the data over to the Restaurant Detail View, just like we did with our Map. We will start with displaying data in our Restaurant Detail View and, then, in our Restaurant List View.

Displaying data in the Restaurant Detail view

First, let's set up our RestaurantDetailViewController and add the following:

  1. Under import UIKit, add:
    import MapKit
  2. Add the following variables after the class declaration and before the selectedRestaurant variable:
    @IBOutlet var lblName: UILabel! @IBOutlet var lblCuisine: UILabel! @IBOutlet var lblHeaderAddress: UILabel! @IBOutlet var lblTableDetails: UILabel! @IBOutlet var lblAddress: UILabel! @IBOutlet var mapView: MKMapView! @IBOutlet var reviewsContainer: ...

Get iOS 10 Programming for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.