告诉 Superview 忽略触摸事件?
我正在向我的超级视图添加一个子视图,我需要知道如何告诉超级视图忽略触摸事件,以便接收触摸事件的唯一视图是子视图。 这将如何完成?
谢谢!
I am adding a subview to my superview and I need to know how to tell the superview to ignore touch events so that the only view receiving touch events, is the subview.
How would this be done?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将超级视图的 userInteractionEnabled 属性设置为 NO:
Set the
userInteractionEnabled
property of the superview toNO
: