iPhone SDK Development - Building iPhone Applications
Map 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
iPhone Games Projects
The iPhone Developer’s Cookbook: Building Applications with the iPhone SDK
iPhone SDK Programming: Developing Mobile Applications for Apple iPhone and iPod touch
Beginning Smartphone Web Development: Building Javascript, CSS, HTML and Ajax-Based Applications for iPhone, Android, Palm Pre, Blackberry, Windows Mobile and Nokia S60
iPhone and iPod Touch Programming: Handling Touch Interactions and Events for Mobile Safari (Wrox Briefs)
Getting Started with iPhone SDK, Android and others: Mobile Application Development - Create your Mobile Applications Best Practices Guide
Related Tutorial
Tags: iPhone, iPhone SDK, Map Annotation, MapKit, MKAnnotation
Comments
Leave a Reply