How to use UILongPressGestureRecognizer with sprite drag & wait?
Posted
by
ganesh
on Game Development
See other posts from Game Development
or by ganesh
Published on 2013-07-22T01:20:34Z
Indexed on
2013/10/21
4:12 UTC
Read the original article
Hit count: 365
May be it's asked before also but I couldn't find any good answer.
Please tell me how this can be implemented with UILongPressGestureRecognizer?
A user drags a sprite from X location to Y location. Then it waits at Y location (touch is not ended yet) for 1 or 2 secs and release the touch i.e touch is ended. In this case, shouldn't following states be triggered in below order for UILongPressGestureRecognizer:
- UIGestureRecognizerStateBegan
- UIGestureRecognizerStateChanged
- UIGestureRecognizerStateEnded
? My problem is if UIPanGestureRecognizer is also implemented to handle drags, UILongPressGesture is never triggered even after Long waits.
Any thoughts?
© Game Development or respective owner