Adding a modal

Let's review the design for the section header:

Note that we have a + Location button that will display our locations. Let's add that modal now:

  1. While in the Main.storyboard file, select the object library and, in the filter field at the bottom of the Library pane, type button.
  1. Drag and drop the Button component into the section header we created in our Explore View Controller:

Ignore the layout warning. We will format the button later regarding location and size, and that will get rid of the warning.

Next, we need to add ...

Get iOS 12 Programming for Beginners - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.