Passing RestaurantID to ReviewFormViewController

The Save button in the Review Form screen can now save a review with a restaurant identifier, but where does ReviewFormViewController get that identifier from? You must pass the identifier value from RestaurantDetailViewController to ReviewFormViewController so that it can save reviews for that restaurant. Do the following steps:

  1. Open RestaurantDetail.storyboard and select the segue used to go to the ReviewForm scene, as follows:
  1. In the Attributes inspector, set Identifier under Storyboard Segue to showReview, as follows (hit Return when done):
  1. Click RestaurantDetailViewController.swift ...

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.