AUK4SO
AUK4SO

Reputation: 411

Handling multiple gestures simultaneously

I have two subviews view1 and view2. I have added LongPress and Pan gesture to my parentview. When I longPress on view1, I will present a draggableview with popup animation just below the fingure and will continue dragging dragView to view2. In this process panGesture selector is not called but Longpress gesture selector is called. After i remove the fingure from dragview and then start dragging again then the panGesture selector is called.

What I need is, once the dragview is created, disable(not permanently but until pan gesture state ended is called) the longpress gesture and the pan gesture selector should be called

Upvotes: 0

Views: 964

Answers (1)

Avi Tsadok
Avi Tsadok

Reputation: 1843

You have a delegate method called:

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer

Take a look at it, you need to return YES.

Upvotes: 4

Related Questions