I have a UIViewController containing MKMapView (actually it contains a full-screen container containing MKMapView, but it should not have any effect)
I implemented UIScreenEdgePanGestureRecognizer (to show the box) as follows:
self.swipeRight = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(handleEdgeGesture:)]; [self.swipeRight setEdges:UIRectEdgeLeft]; [self.swipeRight setDelegate:self]; [self.view addGestureRecognizer:self.swipeRight];
and for it to work, I had to add the following method (return YES):
(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;
But then the card moves simultaneously with the appearance of the box! I tried all kinds of tricks to prevent this, but could not ... (for example, I tried shouldBeRequiredToFailByGestureRecognizer or requireGestureRecognizerToFail )
Any idea how I could prevent MapView from moving when the gesture is ScreenEdgePan from LeftEdge?
ios objective-c mkmapview uigesturerecognizer
Sebastien C.
source share