views:

213

answers:

1

Is it possible to set a minimum rotation value necessary for a UIRotationGestureRecognizer to transition into UIGestureRecognizerStateRecognized? I'm using multiple recognizers, and my UIRotationGestureRecognizer keeps getting called with a very small rotation (Between 1 and 15 degrees either direction) rather than my UIPinchGestureRecognizer.

What I'd like to do is only have the rotation be called if the rotation is within a certain range, otherwise cancel it and let the pinch be called.

A: 

No there isn't such a method.

However, you can check the .rotation property of the gesture recognizer, and determine if you need to take any actions.

KennyTM
Yeah, I've been messing with that, I'm jut unsure of how to stop rotation from being recognized and call on the pinch recognizer. I've checked out the `requireGestureRecognizerToFail` method, but it seems to not work at all.
dc
@dc You did add both recognizers to the view right?
KennyTM
Yes of course. I check the state of the rotation method I defined, and if it is `UIGestureRecognizerStateEnded` I check the rotation value, and if it's within my range I call `[pinchRecognizer requireGestureRecognizerToFail:rotationRecognizer]` - this does not seem to do anything.
dc