In Chapter 10, Building Your App Structure in Storyboard, you added an unwind action method for the Cancel button in ExploreViewController, which dismisses the Locations screen when it is tapped. Now, you'll add an unwind action method for the Done button, which dismisses the Locations screen and sets the selectedCity property in ExploreViewController to the location selected by the user. Perform the following steps:
- Add the following just below the unwindLocationCancel(segue:) method:
@IBAction func unwindLocationDone(segue:UIStoryboardSegue){ if let viewController = segue.source as? LocationViewController { selectedCity = viewController.selectedCity if let location = selectedCity { headerView.lblLocation.text ...