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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.