UIButton超出父视图,不能点击的配置

- (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;  
}  

你可能感兴趣的:(UIButton超出父视图,不能点击的配置)