Unwinding our Cancel button

Now that we have our buttons, we want to dismiss the modal when a user hits Cancel.

In the Main.storyboard, Control + drag from the Cancel button to Exit:

You can also do this in the Outline view.

You will see a window popup that says Action Segue and unwindLocationCancelWithSegue. Select unwindLocationCancelWithSegue:

Let's build and run the project by hitting the Play button (or use command +R), and test our Cancel button. It should now dismiss the View. We will update the Done button when we add code later.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.96.94