0

I have a custom UIView subclass and I added a UITapGestureRecognizer to it.

I notice that when I click once and immediately double click on the view touchesBegan:withEvent is only called twice. If I remove the GestureRecognizer it is called 3 times. I also notice that when I click once and double click after some significant time, touchesBegan:withEvent is called 3 times as expected. What would explain this? Can I let the GestureRecognizer not interfere with the UITouch events?

shreyasva
  • 13,126
  • 25
  • 78
  • 101

1 Answers1

0

Your UITouch events and your UIGestureRecognizer are likely competing with each other for the touch events. There are a few ways to make them work together. See some of these related posts:

Community
  • 1
  • 1
alexgophermix
  • 4,189
  • 5
  • 32
  • 59