首先,userInteractionEnabled是属于IOS message消息机制中的一个环节,它代表着是否处理传过来的objc_msgSend()消息事件.
当userInteractionEnabled背置为NO时,表示不响应objc_msgSend()消息事件,当userInteractionEnabled背置为YES时,则正常响应Touch、Move等事件。需要关注的是,在IOS中个UI控件默认值并不相同:
UIImageView 默认的userInteractionEnabled是NO;
UILabel默认 userInteractionEnabled是NO;
UIView的userInteractionEnabled默认是YES。
当一个视图对象的userInteractionEnabled被置为NO,则这个视图对象就被从响应者链里移除,它所负责响应的事件全部无效。所以他的subviews事件到此都会被丢弃。