Chapter 5. MapKit and the camera in WhereIsMyCar

 

This chapter covers

  • The MapKit framework
  • Working with maps and the current user location
  • Storing and retrieving camera images

As you’ve seen many times over, iOS devices are a great combination of many other devices, including a computer, a phone, a camera, and more. iOS frameworks allow for using these capabilities of the devices, including mobile-related functionality like mapping. Combining these aspects of the devices together can make a simple app multidimensional. Fortunately, the iOS frameworks provide ways to display these features in views using provided view controllers.

Many types of views can be displayed on a controller, and so far you’ve seen buttons, images, and table views. We’ll now focus on the map view, including centering, zooming, and pinning locations on the map. We’ll also examine the image picker, which allows users to select an image from the camera or a photo album on the phone.

I’m sure you’ve had that feeling of coming out of a store and looking in the parking lot trying to remember where you parked your car. Wouldn’t it be great to have an app on your iPhone to show you on a map and with a photo where your car is parked? Various apps in the App Store do this for you, but in this chapter you’ll create your own app called WhereAmIParked.

5.1. Using maps with the user’s location

5.2. Displaying details on MapView locations and storing user’s notes

5.3. Storing, retrieving, and displaying camera images

5.4. Summary

sitemap