MapKit new one handed zoom

It seems that you can now do the one handed zoom gesture in MapKit that you've been able to do for some time in the Maps app. For those not familiar this is a tap and then tap again. On the second tap hold your finger on the screen and you can move up and down to control zoom.


It's quite nice but now it's in MapKit it is causing issues!


Many apps have a lot of annotations, unlike the Maps app. It seems that tapping on an annotation and then trying to pan around actually triggers this new zoom action! All I was trying to do was pan!


Is there any way to disable this new one handed zoom or can it be tweaked by Apple before launch as it is behaving not how a user would expect!

It was interfering with a long press gesture that would turn on a selection mode in my app. We the selection mode is on the user taps on items to select. The issue was the first tap gesture would fail. Root cause was the '_MKOneHandedZoomGestureRecognizer' gesture (two days cost to debug.)

There is no interface to these MapView gestures so below is a hack work-around (hack meaning it could break in a future iOS release):

  1. On the long press gesture set the delegate to object with UIGestureRecognizerDelegate protocols

  2. The UIGestureRecognizerDelegate function of interest is:

  • (BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { if ([otherGestureRecognizer isKindOfClass:UITapGestureRecognizer.class] || [otherGestureRecognizer isKindOfClass:UIPinchGestureRecognizer.class] || [otherGestureRecognizer isKindOfClass:UIRotationGestureRecognizer.class] || [otherGestureRecognizer isKindOfClass:UISwipeGestureRecognizer.class] || [otherGestureRecognizer isKindOfClass:UIPanGestureRecognizer.class] || [otherGestureRecognizer isKindOfClass:UILongPressGestureRecognizer.class]) { return NO; } else if (otherGestureRecognizer.view.superview == self.mapView && otherGestureRecognizer.state != UIGestureRecognizerStateBegan) { return YES; } else { return NO; }

}

MapKit new one handed zoom
 
 
Q