场景是这样的,
我有一个 UIButton
合二为一UIView
.
所以UIView
是父 View
和 UIButton
是 subview 。
现在,
UIButton
? UIButton
那为什么 UIButton
不是可触摸的?
你能解释一下如何
UIButton
会知道它的父 View 的用户交互是假的吗?谢谢,
最佳答案
类似问题,查看here
self.superView.userInteractionEnabled
在 hitTest:withEvent:
方法或pointInside:withEvent:
方法。 关于ios - subview 如何识别父 View (iPhone)的设置属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14556171/