From 558fef52575b600377422681bf80fadda769b0fa Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Thu, 6 Feb 2014 13:17:31 -0500 Subject: [PATCH] fixes #45: only simultaneously allow pan, pinch, and rotate --- ios/MBXViewController.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm index dc465be36..ead6a719d 100644 --- a/ios/MBXViewController.mm +++ b/ios/MBXViewController.mm @@ -214,7 +214,9 @@ class MBXMapView - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { - return YES; + NSArray *validSimultaneousGestures = @[ [UIPanGestureRecognizer class], [UIPinchGestureRecognizer class], [UIRotationGestureRecognizer class] ]; + + return ([validSimultaneousGestures containsObject:gestureRecognizer] && [validSimultaneousGestures containsObject:otherGestureRecognizer]); } CADisplayLink *displayLink;