4

I am developing an App in ISGL3D. I need to recognise only one Gesture at a time

i.e. either PICNH or PAN..

Is there any way to do that??

Shekhar Gupta
  • 6,206
  • 3
  • 30
  • 50

2 Answers2

7

You have to implement the UIGestureRecognizerDelegate method gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: and return NO

Pratik B
  • 1,599
  • 1
  • 15
  • 32
5

You can use this function for recognise only one Gesture at a time:

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
    if (gestureRecognizer.view != otherGestureRecognizer.view)
        return NO;

    return YES;
}
pritam001
  • 1,667
  • 1
  • 16
  • 23