[ASControlNode] Upgrades to +setEnableHitTestDebug: to intersect hitTestSlop with parents' bounds+slop, to accurately predict and visualize UIKit event delivery edge cases.

This commit is contained in:
Scott Goodson
2016-03-27 22:02:13 -07:00
parent 3e2414da6f
commit cd493358cc
3 changed files with 45 additions and 16 deletions

View File

@@ -2383,11 +2383,13 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
return [superview gestureRecognizerShouldBegin:gestureRecognizer];
}
#if DEBUG
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
ASDisplayNodeAssertMainThread();
return [_view hitTest:point withEvent:event];
}
#endif
- (void)setHitTestSlop:(UIEdgeInsets)hitTestSlop
{