意义:旨在找到响应的那个控件。
先看一段代码:
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
CGPoint hitPoint = [_testButton convertPoint:point fromView:self];
if ([_testButton pointInside:hitPoint withEvent:event])
return _testButton; return [super hitTest:point withEvent:event];
}
在此处便可以发现涉及到坐标系的处理
判断一个点是否在某一个view区域内
- (BOOL)pointInside:(CGPoint)point withEvent:(