I have a question that may seem basic, but it cannot understand.
The main question: how to programmatically put gesturerecognizer into a failed state from a handler, whereas in a UIGestureRecognizerStateBegan or UIGestureRecognizerStateChanged?
More detailed explanation: I have a long gesture recognition id for a UIView inside a UIScrollView. I did
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { return YES; }
because otherwise I can't get the scroll to scroll as soon as the user places his finger down in the view. This is a basic touch like a safari, where you hold your finger down the link that selects the link, but scrolls up or down - then the link is not highlighted, and the scroll is viewed.
I can make this basically work right now, since both gestures are recognized, but it would be better if I could detect movement in the longpress gesturerecognizer StateChanged, and if it has more than 20 pixels or so, just programmatically make longpress fail.
Can this be done? Or am I digging in the wrong place?
source share