0

I manage to make the annotation clickable using this:

- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
   NSLog(@"touch");
}

I would like for a small popup view with 3 buttons and the title of the annotation to appear when the annotation is clicked.

dastjuso
  • 161
  • 2
  • 10
  • What you're talking about is a "callout" if you look yo how to make custom callouts you'll find lots of questions and answers about how to do that. – Craig Oct 10 '13 at 23:10
  • no I don't want a "callout", I want a popup view to appear when the annotation is pressed something like this http://stackoverflow.com/questions/16230700/display-uiviewcontroller-as-popup-in-iphone – dastjuso Oct 11 '13 at 00:54
  • oh, you just want to make a view and add it to the main view then. Seems simple, what have you tried? – Craig Oct 11 '13 at 02:00
  • I try it with two uiviewcontrollers but didn't work, I will try with a view inside the mail view so when I pressed the annotation it will make it visible. – dastjuso Oct 11 '13 at 02:19
  • @Craig thanks it worked with two views, would you like to respond so I can check your answer as correct? also do you know who to get the annotation title on a uilabel? – dastjuso Oct 12 '13 at 20:29

1 Answers1

1

Create a view. Then find the mapview's parent and add this new view as a subview of that.

Craig
  • 8,093
  • 8
  • 42
  • 74