Map Kit View

The last thing we need to do is to set up our Map tab. Select the Main.storyboard file and find the View Controller connected to the Map tab:

Let's get started:

  1. Open the Object Library (Command + shift + L), then type map.
  2. Drag and drop Map Kit View onto the Map View Controller:

  1. Select the Pin icon and enter the following values:
    • All values under Add New Constraints are set to 0.
    • Uncheck the Constrain to margins checkbox. 
    • Click on Add 4 Constraints.
  2. Your View Controller should look like the following when you are done:
  1. Run the project by hitting the Play button (or using Command + R) and selecting the Map tab:

We now have both tabs set up, but, as we progress through the book, we will add more scenes to the storyboard. The following is what your Main.storyboard file should look like: 

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

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