Currently, if you hit Select a location in your simulator, a modal pops up. However, you cannot dismiss the modal without restarting the entire app. Therefore, we need a Cancel button and a Done button to dismiss the view. Let's work on this first:
Open
Explore.storyboard
and select the segue that is connected to your Select a Location. It should now be highlighted.Then, go to your View Controller (not the Navigation Controller) of your modal:
As you have done in previous chapters, type in
bar button
into the filter area of theObjects
library in the Utilities panel.Drag and drop a Bar Button Item into the right area of the Navigation Bar of your View Controller Scene:
Drag another Bar Button Item into the left area of the Navigation Bar:
You should now have two Bar Button Items that both say Item: