Adding a Map
Next, you see how to add a map and get location information directly from the map, as well as how to display the location of the contacts in the database on the map.
1. Select the Map View Controller in Storyboard and delete the Label
and UITextView
.
2. Add a new view controller to hold the map by dragging a View Controller from the Object Library to the Storyboard.
3. Drag a Map View from the Object Library to the Map View Controller. It should expand to fill the entire space available. Use the blue guidelines to center the Map View inside the View Controller.
4. Open LMASecondViewController.h and right-click LMASecondViewController in the @interface
line. Select Refactor > Rename.
5. Change the name to LMAMapController, and make ...
Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android 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.