Displaying Standard and Custom Annotation Views

An annotation view is the representation of the annotation on the map. Two types of standard annotation views are provided with MapKit, the pin for searched locations and the pulsing blue dot for the current location. Annotation views can be customized with a static image, or can be completely customized with a subclass of MKAnnotationView. The sample app uses standard pins for favorite places, the standard blue dot for the current location, and a green arrow for a draggable annotation example, as shown in Figure 2.8.

Image

Figure 2.8 FavoritePlaces sample app: displaying map annotation views.

To allow ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.