UIButton TouchUpInside sometimes fails

I create UIButtons programmatically and set their goals. In most cases, the TouchDown-TouchDragInside-TouchUpInside chain works fine, but if I quickly execute this chain of events (about 2-3 times per second), the TouchUpInside-related method sometimes fails.

From my understanding, UIEvents always fire, even if they don't fire immediately. Is this a known issue that I can't seem to find anything about? What can I do about it besides the slower events?

+4
source share
1 answer

I think you are creating a button that you can switch and click. If so, the two gestures will also not work well, you can add swipe gestures to the button, it works well, Hope can help you.

0
source

Source: https://habr.com/ru/post/1435632/


All Articles