我正在尝试在我的应用上叠加透明图片,目的是解释该视图的控件。首次触摸UIImageView时,它应该会消失。我的MainViewController实现了touchesBegan / Ended方法,它们工作正常,直到我将UIImageView连接到MainViewController中的IBOutlet。只需停止响应事件。我做错了什么?
-MainView
--ScrollView
--OtherView
--UIImageView (this is the overlay)
答案 0 :(得分:5)
UIImageViews默认情况下没有打开用户交互。如果您想要它,可以通过IB设置属性,启用用户交互或通过代码...
[myImageView setUserInteractionEnabled:TRUE];