当子view的frame超出父view的frame,无法响应交互的解决方法

    xiaoxiao2021-12-14  21

    http://www.xuebuyuan.com/1225027.html

    让控件复写 -(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event方法。 只有控件存在无论可见度是什么uikit框架会递归回调此接口。

       若要subview响应touch事件,只需判断point是否在subview控件区域内,若在则返回此subview。若不在则返回nil。

    转载请注明原文地址: https://ju.6miu.com/read-963722.html

    最新回复(0)