As we have done before, we need to add code for us to unwind (dismiss) a View Controller:
- Open the
RestaurantDetailsViewController.swift
file and add the following into the private extension:
@IBAction func unwindReviewCancel(segue:UIStoryboardSegue) {}
- Save the file and open the
ReviewForm.storyboard
. - CTL drag the
Cancel
button to the Exit icon inside of the same View Controller:
- In the screen that appears, under
Action Segue
, selectunwindReviewCancelWithSegue
.
If you build and run the project by hitting the Play button (or use cmd + R), you should now be able to dismiss the Ratings View
.