UIButton UIControlEventTouchUpInside does not fire, but UIControlEventTouchDown does fire

我的未来我决定 提交于 2019-12-04 06:25:51

I have an assumption why it doesn't take the UIControlEventTouchUpInside:

I had two "BannerView" (Advertisement) in two different ViewControllers. In one it just worked fine in the other I saw how the UIButton was touched and the second image (darker) appeared. But the selector was not hit. Then I realized, that the Up-Event was absorbt by a UISwipeGestureRecognizer from a UIImageView below. Some Recognizer compete against each other. I searched for an overview to see witch ones these are, but found nothing.

Another solution: If you see that the ButtonState doesn't change u have to look if you have a View over your Button.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!