- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
CGMutablePathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path,NULL,0,0);
CGRect rect = CGRectMake(0, 100, 320, 40);
CGPathAddRect(path, NULL, rect);
if(CGPathContainsPoint(path, NULL, point, NO))
{
[self.superview touchesBegan:nil withEvent:nil];
}
CGPathRelease(path);
return self;
}
如何屏蔽父view的touch事件到,并且响应self的touch
最新推荐文章于 2016-11-16 11:13:43 发布