关于UIView的userInteractionEnabled属性

关于UIView的userInteractionEnabled属性

如果父视图为ParentView包含一个Button,如果再ParentView上添加子视图ChildView,且ChildView盖住了Button,那么Button就得到不响应了,为了让Button响应,可以设置ChildView的userInteractionEnabled = NO;最近被这个问题困扰了很久,开始想用事件传递的方法,重写类继承自UIView,最后被这简单属性搞定了....

原文地址:https://www.cnblogs.com/meixian/p/5370866.html