From 29a360d56252ce23bed4bf54e800de917ace723b Mon Sep 17 00:00:00 2001 From: Ryan Nystrom Date: Thu, 26 Mar 2015 17:22:22 -0700 Subject: [PATCH] Allow double-tap gestures on text nodes --- AsyncDisplayKit/ASControlNode.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASControlNode.m b/AsyncDisplayKit/ASControlNode.m index 34063b30d0..f423c33606 100644 --- a/AsyncDisplayKit/ASControlNode.m +++ b/AsyncDisplayKit/ASControlNode.m @@ -196,7 +196,9 @@ void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, v { // If we're interested in touches, this is a tap (the only gesture we care about) and passed -hitTest for us, then no, you may not begin. Sir. if (self.enabled && [gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]] && gestureRecognizer.view != self.view) { - return NO; + UITapGestureRecognizer *tapRecognizer = (UITapGestureRecognizer *)gestureRecognizer; + // Allow double-tap gestures + return tapRecognizer.numberOfTapsRequired != 1; } // Otherwise, go ahead. :]