Laurenz
Laurenz

Reputation: 31

MapKit iPhone Development - Adding Annotations to a Map - iOS SDK

I would like to create annotations on a Map like this:
img

If you click on the blue arrow a menu should open. In the menu should be two menu points. First a Telephone number (if I click on the number the iphone dial/call this number) and second a "Directions to here".

At the moment I run on this code

MKCoordinateRegion region4 = { {0.0, 0.0 }, { 0.0, 0.0 } }; 
region4.center.latitude = 48.13479 ;
region4.center.longitude = 11.582111;
region4.span.longitudeDelta = 0.01f;
region4.span.latitudeDelta = 0.01f;

DisplayMap *ann4 = [[DisplayMap alloc] init]; 
ann4.title = @"The Title!";
ann4.subtitle = @"The Subtitle!"; 
ann4.coordinate = region4.center; 
[mapView addAnnotation:ann4];

How do I show blue-arrow as shown in the image? Can you please suggest me on this..

Upvotes: 3

Views: 12934

Answers (2)

saadnib
saadnib

Reputation: 11145

You have to add a UIButton of type UIButtonTypeDetailDisclosure in the rightCalloutAccessoryView of your MKAnnotationView.

Upvotes: 3

ryyst
ryyst

Reputation: 9801

Check out the MKAnnotationView Class Reference, and "Managing Callout Views" specifically.

Upvotes: 0

Related Questions