Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIGestureRecognizer over UIScrollView

I need to detect left and right swipe over a UIScrollView with 3 fingers when horizontal scrolling is possible. I need to keep all the interactions with 1 and 2 fingers. Is it possible to do that without rewrite all gesture recognision.

Thank you

like image 451
olivierplante Avatar asked Jun 21 '11 13:06

olivierplante


1 Answers

It's possible. Add a swipe gesture to your UIScrollView and be sure to implement

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

So they will not cancel each other.

like image 128
Jake Avatar answered Nov 15 '22 07:11

Jake