0

As we know that annView(annotation view) has left and right CalloutAccessoryView, but why annotation view doesnt have a callout outlet? because I want to make a event that will be called if Annview.callout has been clicked. or is there anything code to do that without customize Callout?

so we have annView.rightCalloutAccessoryView and we have annView.leftCalloutAccessoryView

why we do not have annView.Callout?

user4951
  • 32,206
  • 53
  • 172
  • 282
  • check this out. Detect tap on title of callout http://stackoverflow.com/questions/8469539/detect-tap-on-title-of-callout/13495795#13495795 – ytur Nov 25 '12 at 22:56

1 Answers1

1

Hee,

you can user the MKMapView delegate method:

  • (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control

you can check in that method wich location has been clicked with an if or switch statement.

Maby thats what you needed?

Rolf Koenders
  • 439
  • 3
  • 8
  • yea I know it, but there is no problem, the problem is why annView don't have annview.callout? so We can customize it easily, such as [annView.callout setgesture...] – user4951 Jul 22 '11 at 02:15
  • I've found this link few days ago on SO. http://blog.asolutions.com/2010/09/building-custom-map-annotation-callouts-part-1/ Maby that helps you out? – Rolf Koenders Jul 22 '11 at 13:59
  • 1
    I want to detect the tap at callout not the accessories button. – user4951 Jul 29 '11 at 05:36