Chapter 9. Working with location and maps
This chapter covers
- Using maps in your views
- Getting the current location
- Showing pins on a map
The iPhone has so many features that many things that used to be separate gadgets can be apps. For most of us, the GPS on the phone is sufficient for our location and direction needs, and we don’t need a dedicated GPS device. The next application you’ll write, Parkinator, uses this feature to solve an important mobile computing problem: remembering where you parked.

Let’s make the UI for this app just a front and back screen. On the front, you’ll see your location and the last place you parked. On the back, you’ll take a picture of your car, and when you’re finished, the app will flip back and put a pin at your spot.
Let’s make a quick sketch.
See the little i in a circle at the bottom? That’s how you get to the flip side of the app. You haven’t used this kind of navigation before, but lots of apps use it, including the built-in Weather app.
This application’s behavior is simple. Because you just want to learn about location, maps, and pins, we’ll make sure the rest of the app uses things you’ve seen before.
