JAck
JAck

Reputation: 854

how to get only two gesture work together and one separetly

I am using three gesture named Pan, Pinch and Rotate. I want To use Pinch and Rotate gesture together and Pan separate. I am using gestureDelegate method like below :

 func gestureRecognizer(_: UIGestureRecognizer,
                           shouldRecognizeSimultaneouslyWithGestureRecognizer:UIGestureRecognizer) -> Bool
    {
        return true

    }

But it runs thrice. I want two Simultaneously.

Upvotes: 1

Views: 65

Answers (1)

Nirav D
Nirav D

Reputation: 72410

If you have implemented this single method shouldRecognizeSimultaneouslyWithGestureRecognizer of UIGestureRecognizerDelegate than simply remove the delegate of UIPanGestureRecognizer or could not set it.

Upvotes: 1

Related Questions