Performing the showDetail segue

You have linked the map view controller scene inside Main.storyboard to a restaurant detail scene inside RestaurantDetail.storyboard using a storyboard reference and you have set the segue identifier to showDetail. You now need to implement a method to perform that segue and assign it to the callout button. Before you do so, you'll use an enumeration (discussed in Chapter 7, Classes, Structures, and Enumerations) to hold all of the segue identifiers for this project. This reduces the chances of making a mistake by enabling autocompletion when you type the segue identifiers later in your code:

  1. Right-click on the Misc folder inside the LetsEat folder and choose New File.
  2. iOS should already be selected. Choose ...

Get iOS 13 Programming for Beginners - Fourth 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.