iphoneobjective-cmkmapviewmkplacemark

Disable MKPlacemark showing/hiding title in iPhone


I have MKMapView with MKPlacemark on it. When showing the map, I'm showing place mark's title. Everything is fine until now.

I want to disable hiding title when user touches it.

I tried to add

myMapView.userInteractionEnabled = NO;
myMapView.multipleTouchEnabled = NO;

Which helps, but completely disables interaction with map. I want to leave a possibility to zoom in/out and moving the map.


Solution

  • The following code did the trick

    for (UIGestureRecognizer *g in [myMapView gestureRecognizers]) 
            [myMapView removeGestureRecognizer:g];