Displaying Data in Restaurant Detail

Our app is coming together nicely, but we have one more section to do before we can start adding features. We have data in all of our views, except for in our restaurant detail view. In the last chapter, we passed data using segues, and we are going to do this again in this chapter. We have a few other things in this view that we need to set up before we move on to some of the features of the app.

In this chapter, we will cover the following topics:

  • Passing data using segues
  • Connecting IBOutlet to display data
  • Displaying one annotation in a map view

Let's set up our RestaurantDetailViewController by adding the following:

  1. Add the following variables after the class declaration and before the selectedRestaurant ...

Get iOS 12 Programming for Beginners - Third Edition 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.