iPhone SDK Development - Building iPhone Applications

iPhone SDK Development - Building iPhone ApplicationsMap Annotations
There are two parts to each annotation on the map. The model piece of it is intended to be light weight so you can have many of them attached to a given map and not have to worry about the memory footprint. The other side is the view. Let’s look at the model side first.

Map kit defines the MKAnnotation protocol but no public implementations. So in order to add an annotation to the map we need to create our own implementation of this protocol. The protocol defines one property and two optional methods. The property is the location for the annotation, the methods are title and subtitle. The title is used as the text for the callout when the user clicks on the annotation. The subtitle is displayed in smaller text under the title. Here is the header file for our annotation.

Website: media.pragprog.com | Filesize: 664kb
No of Page(s): 13
Click here to download iPhone SDK Development - Building iPhone Applications.

Related Copyrighted Books

Related Tutorial

Tags: , , , ,

Comments

Leave a Reply