Passing a selected location back to Explore View

We need to be able to send the selected city back to our ExploreViewController. Therefore, we need a selected city, as well, unwind for the Done button inside ExploreViewController. First, let's get our selected city to display in our Explore view:

  1. Add the following variable under the constant manager in our ExploreViewController.swift file:
var selectedCity:LocationItem?
var headerView: ExploreHeaderView!
  1. Next, open Explore.storyboard and select the Explore Header View in the Outline view:
  1. Then, select the Connections inspector in the Utilities Panel, and click and drag lblLocation from the empty circle under Outlets to the label in the Explore View Controller Header scene:

Next, let's unwind our Done button in our Explore View Controller.