0
votes

i have a UIPanGestureRecognizer on my rootViewControllers view

that controls only 2 finger swipe ( min and max are set on 2 )

I have a couple of UITableView and UIScrollView on my rootViewControllers view. But the 2 finger swipe should always have number 1 priority

so i put a requireGestureRecognizerToFail on my UITableView and UIScrollView's panGesture property.

this works perfectly but now when i pan my UITableView and UIScrollView, it doesn't move until i stop swiping.

Is there a solution for this?

i have added a sample project to display what the problem is: https://github.com/avalanched/UIScrollViewTest

1

1 Answers

0
votes

You will need to allow the gesture recognizers to simultaneously recognize by setting the delegate on all the gesture recognizers and implementing gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:.

See Apple's UIGestureRecognizerDelegate Documentation.

You also need to remove the requireGestureRecognizerToFail calls, these are what causes the delay.