开发者

Events are not Visible on UIImageView

开发者 https://www.devze.com 2022-12-26 00:14 出处:网络
I have a UIImageView, and a referencing outlet. However, altough I\'ve set User Interaction of the ImageView, I cannot see any event in IB. Is it normal or am I missing something?开发者_JAVA百科UIImag

I have a UIImageView, and a referencing outlet. However, altough I've set User Interaction of the ImageView, I cannot see any event in IB. Is it normal or am I missing something?开发者_JAVA百科


UIImageView is not a kind of UIControl, so you cannot set events to it. You have to use a UIButton with background, or subclass UIImageView and override the -touchesBegan: methods.

0

精彩评论

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