Search code examples
iphonemapkituiactionsheet

is there a way to display actionsheet on click of annotation (mapkit ios)


can we display a UIActionSheet on click of annotation in the MapKit?


Solution

  • I am doing this and showing popOver on click on annotation so in that case you can create a view and then inside the view do what ever you want.

    - (void)mapView:(MKMapView *)aMapView didSelectAnnotationView:(MKAnnotationView *)view 
    {
    if([view conformsToProtocol:@protocol(CustomAnnotationViewProtocol)]) 
    {
        [((NSObject<CustomAnnotationViewProtocol>*)view)      didSelectAnnotationViewInMap:mapView];
    }
    }