Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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:

  1. UIGestureRecognizerStateBegan
  2. UIGestureRecognizerStateChanged
  3. UIGestureRecognizerStateEnded

? My problem is if UIPanGestureRecognizer is also implemented to handle drags, UILongPressGesture is never triggered even after Long waits.

Any thoughts?

share|improve this question

1 Answer 1

I decided to use UIPan gesture instead of UILongPress. Both works almost same so I don't need both of them together. One of them should be able to do the job.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.