- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
UIView *view = [super hitTest:point withEvent:event];
for (UIView *subview in self.subviews) {
if (view != nil &&view.userInteractionEnabled)
break;
CGPoint newPoint = [self convertPoint:point toView:subview];
view = [subview hitTest:newPoint withEvent:event];
}
return view;
}
{
UIView *view = [super hitTest:point withEvent:event];
for (UIView *subview in self.subviews) {
if (view != nil &&view.userInteractionEnabled)
break;
CGPoint newPoint = [self convertPoint:point toView:subview];
view = [subview hitTest:newPoint withEvent:event];
}
return view;
}