userInteractionEnabled defaults to NO

Previously self.userInteractionEnabled defaulted to YES, and this
caused plenty of bugs for me when text nodes would silently steal
touches. It should default to NO, and callers who want tappability on
their text nodes should manually set .userInteractionEnabled to YES.
This commit is contained in:
Madelaine Boyd 2014-08-15 12:07:24 -07:00
parent 07a538a2dc
commit a6a2907ad9

View File

@ -117,8 +117,8 @@ ASDISPLAYNODE_INLINE CGFloat ceilPixelValue(CGFloat f)
_shadowOpacity = [super shadowOpacity];
_shadowRadius = [super shadowRadius];
// Enable user interaction for text node, as ASControlNode disables it by default.
self.userInteractionEnabled = YES;
// Disable user interaction for text node by default.
self.userInteractionEnabled = NO;
self.needsDisplayOnBoundsChange = YES;
_truncationMode = NSLineBreakByWordWrapping;