button 超出父视图 响应处理方法

    xiaoxiao2021-12-13  32

    - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {       UIView *view = [super hitTest:point withEvent:event];       if (view == nil) {       CGPoint tempoint = [btn convertPoint:point fromView:self];           if (CGRectContainsPoint(btn.bounds, tempoint))        {              view = btn;           }        }                  return view;   }  
    转载请注明原文地址: https://ju.6miu.com/read-950000.html

    最新回复(0)