Creating and adding annotations
Now, we need to get our Map hooked up and start getting the annotations displaying on the Map. Then, we will customize our annotations to look like those in our design.
Creating our Map View Controller
We need to create our Map View Controller file and then connect it with our UIViewController and Map View in Storyboard. First, let's create this file:
- In the Navigator panel, right-click on the
Controllerfolder in the
Mapfolder and select New File.
- Inside of the Choose a template for your new file screen, select iOS at the top and then Cocoa Touch Class. Then, hit Next.
- Add the following into the options screen that appears:
- New File:
- Also create XIB: Unchecked
- Language ...