开发者

TouchesEnded event

开发者 https://www.devze.com 2023-01-13 23:08 出处:网络
I have created a view which has an object img which is a subclass of UIImageView and I have added the touchesEnded method to the img class. But when I click on the img class object, the touchesEnded e

I have created a view which has an object img which is a subclass of UIImageView and I have added the touchesEnded method to the img class. But when I click on the img class object, the touchesEnded event is not triggered.

Does any开发者_如何学Pythonone have an idea what may be wrong, please?

Thank you!


UIImageView by default has userInteractionEnabled property set to NO so it does not track any touch events. Try to set userInteractionEnabled to YES

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号