KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to add a pan gesture recognizer to a view containing a scrollview, but I guess I've problems with priorities. My global UIView has a UIPanGestureRecognizer set like this: _bottomPanGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(bottomPanGestureDetected:)]; _bottomPanGestureRecognizer.minimumNumberOfTouches = 2; _bottomPanGestureRecognizer.maximumNumberOfTouches = 2; _bottomPanGestureRecognizer.delaysTouchesBegan = NO; _bottomPanGestureRecognizer.delaysTouchesEnded = NO; I want to recognize this gesture to display another view from the bottom with some sort of pinch down-to-up. The problem is that the scrollview is recognizing its own pan gesture before mine. So I tried to delay it thanks to: [_scrollView.panGestureRecognizer requireGestureRecognizerToFail:_bottomPanGestureRecognizer]; And it's working, the scrollview event is fired after my two finger down to up recognizer, but the problem is now when I only use one finger to scroll in the scrollview, the scroll works after a small delay. I would like to have no delay for this event, is this possible? Any idea welcomed! Cheers. Cyril
Tags (comma-separated)
Save Edits
Cancel