I am using an MKMapView
containing a couple of MKAnnotation
pins.
Above the map I am showing a UITableView
with detailed information of the MKAnnotation
pins.
My problem: When I select a pin, I would like to select the corresponding table cell. For this I would like to catch an event/delegate if the pin is selected. I am not talking about calling the callout accessory
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
Just an update to this -- in iOS 4 there are MKMapViewDelegate methods that can be used to track annotation selection and de-selection:
- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
- (void)mapView:(MKMapView *)mapView didDeselectAnnotationView:(MKAnnotationView *)view
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With