I have a MKMapView and a few MKAnnotationViews on my map.
When a certain event happens, I would like to disable user interaction on my MKMapView but leave interaction on my MKAnnotationView available.
Ideally, it would be
self.mapView.userInteraction = NO;
self.myAnnotationView.userInteraction = YES;
Printing
[self.mapView recursiveDescription]
I have found that my annotation view is nested in MKNewAnnotationContainerView which doesn't have a publicly exposed property on Apple's class reference.
Any ideas?
On the mapView, set
scrollEnabled,zoomEnabled,pitchEnabled, androtateEnabledtoNOand leaveuserInteractionEnabledasYES.This way, the annotation views will still be enabled.
For
pitchEnabledandrotateEnabled, you may want to check if those properties exist before setting them (eg. check if the map viewrespondsToSelector:@selector(setPitchEnabled), etc.) since they were added in iOS 7.