I have a question that might seem basic but can't figure it out.
Basic question is: how do I programmatically put a gesturerecognizer into fail state from handler, while it's in UIGestureRecognizerStateBegan or UIGestureRecognizerStateChanged?
More detailed explanation: I have a long press gesture recognizer for UIView inside a UIScrollView. I have made
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
because else I can't get scroll view to scroll once user puts their finger down at the view. It's basic touch like safari, where you hold finger down on a link, which highlights the link, but scroll up or down - then link is unhighlighted and scrollview moves.
I can get this mostly working right now since both gestures are being recognized, but it would be better if I can detect movement in longpress gesturerecognizer's StateChanged, and if it's more than 20 pixels or so, just programmatically make longpress fail.
Is this possible to do? Or am I digging at a wrong spot?