I have an area of my screen on which I want to recognize a long press. I use a UILongPressGestureRecognizer.
Once the long press event happens, I show a custom UIView that has a touchesMoved
method, by adding it as a subview. This custom UIView is added right in the center of where the long press event happened, it is right under my finger.
Problem: If I'm continuously holding my finger after the long press, the touchesMoved
on the custom UIView is not called. Only when I lift my finger and touch again is the touchesMoved
method recognized.
Any possible solutions? I believe the problem is that when the touch started, it originated from the underlying view. Even though I add a new UIView on top of the hierarchy and move my finger over it, it is not recognized, ie touchesMoved
is not called because the view went into the hierarchy already after the touches have began.
I've tried a couple of things to cancel the long press gesture recognizer but nothing seems to be working. Thanks.