- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event{
UIView *hitView = [super hitTest:point withEvent:event];
if(hitView == self){
return nil;
}
return hitView;
}

 只需要在上层视图的View中添加这个代码就可以了。

相关文章:

  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-10-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案