charudatta charudatta - 1 year ago 83
iOS Question

How to suppress the "Current Location" callout in map view

Tapping the pulsating blue circle representing the userLocation brings up a "Current Location" callout. Is there a way to suppress that?

Answer Source

There's a property on the annotation view you can change, once the user location has been updated:

- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
    MKAnnotationView *userLocationView = [mapView viewForAnnotation:userLocation];   
    userLocationView.canShowCallout = NO;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download