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

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