简体   繁体   中英

Mapkit accessory button issue

im trying to get the index of the annotation when the disclosure button is tapped using the

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

i have been pointed to the control.tag property, but whenever i use NSLog(@"tag value from control: %d", control.tag); it always returns 0.

anyone know how i can get the index of the annotation

tag (default) value is 0 unless you assign something else to it. Have you set another value to the tag property somewhere?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM