diff --git a/Source/ASDisplayNode.h b/Source/ASDisplayNode.h index b0c215699..e5d215b8b 100644 --- a/Source/ASDisplayNode.h +++ b/Source/ASDisplayNode.h @@ -692,7 +692,6 @@ extern NSInteger const ASDefaultDrawingPriority; * contentMode for your content while it's being re-rendered. */ @property (nonatomic, assign) UIViewContentMode contentMode; // default=UIViewContentModeScaleToFill -@property (nonatomic, assign) UISemanticContentAttribute semanticContentAttribute; // default=Unspecified @property (nonatomic, assign, getter=isUserInteractionEnabled) BOOL userInteractionEnabled; // default=YES (NO for layer-backed nodes) #if TARGET_OS_IOS diff --git a/Source/Details/UIView+ASConvenience.h b/Source/Details/UIView+ASConvenience.h index a8a74e2a1..9c918689e 100644 --- a/Source/Details/UIView+ASConvenience.h +++ b/Source/Details/UIView+ASConvenience.h @@ -51,16 +51,15 @@ NS_ASSUME_NONNULL_BEGIN */ @protocol ASDisplayNodeViewProperties -@property (nonatomic, assign) BOOL clipsToBounds; -@property (nonatomic, getter=isHidden) BOOL hidden; -@property (nonatomic, assign) BOOL autoresizesSubviews; -@property (nonatomic, assign) UIViewAutoresizing autoresizingMask; -@property (nonatomic, strong, null_resettable) UIColor *tintColor; -@property (nonatomic, assign) CGFloat alpha; -@property (nonatomic, assign) CGRect bounds; -@property (nonatomic, assign) CGRect frame; // Only for use with nodes wrapping synchronous views -@property (nonatomic, assign) UIViewContentMode contentMode; -@property (nonatomic, assign) UISemanticContentAttribute semanticContentAttribute; +@property (nonatomic, assign) BOOL clipsToBounds; +@property (nonatomic, getter=isHidden) BOOL hidden; +@property (nonatomic, assign) BOOL autoresizesSubviews; +@property (nonatomic, assign) UIViewAutoresizing autoresizingMask; +@property (nonatomic, strong, null_resettable) UIColor *tintColor; +@property (nonatomic, assign) CGFloat alpha; +@property (nonatomic, assign) CGRect bounds; +@property (nonatomic, assign) CGRect frame; // Only for use with nodes wrapping synchronous views +@property (nonatomic, assign) UIViewContentMode contentMode; @property (nonatomic, assign, getter=isUserInteractionEnabled) BOOL userInteractionEnabled; @property (nonatomic, assign, getter=isExclusiveTouch) BOOL exclusiveTouch; @property (nonatomic, assign, getter=asyncdisplaykit_isAsyncTransactionContainer, setter = asyncdisplaykit_setAsyncTransactionContainer:) BOOL asyncdisplaykit_asyncTransactionContainer; diff --git a/Source/Private/ASDisplayNode+UIViewBridge.mm b/Source/Private/ASDisplayNode+UIViewBridge.mm index 78012a86e..665aa3ed6 100644 --- a/Source/Private/ASDisplayNode+UIViewBridge.mm +++ b/Source/Private/ASDisplayNode+UIViewBridge.mm @@ -773,25 +773,11 @@ - (void)setEdgeAntialiasingMask:(unsigned int)edgeAntialiasingMask _setToLayer(edgeAntialiasingMask, edgeAntialiasingMask); } -- (UISemanticContentAttribute)semanticContentAttribute -{ - _bridge_prologue_read; - if (AS_AT_LEAST_IOS9) { - return _getFromViewOnly(semanticContentAttribute); - } - return UISemanticContentAttributeUnspecified; -} - -- (void)setSemanticContentAttribute:(UISemanticContentAttribute)semanticContentAttribute -{ - _bridge_prologue_write; - if (AS_AT_LEAST_IOS9) { -#if YOGA - [self semanticContentAttributeDidChange:semanticContentAttribute]; -#endif - _setToViewOnly(semanticContentAttribute, semanticContentAttribute); - } -} +// Add to setSemanticContentAttribute: when this lands: +// https://github.com/TextureGroup/Texture/pull/60/files +//#if YOGA +// [self semanticContentAttributeDidChange:semanticContentAttribute]; +//#endif @end diff --git a/Source/Private/_ASPendingState.mm b/Source/Private/_ASPendingState.mm index 666325aa6..0baad1129 100644 --- a/Source/Private/_ASPendingState.mm +++ b/Source/Private/_ASPendingState.mm @@ -75,7 +75,6 @@ int setAccessibilityHeaderElements:1; int setAccessibilityActivationPoint:1; int setAccessibilityPath:1; - int setSemanticContentAttribute:1; } ASPendingStateFlags; @implementation _ASPendingState @@ -119,7 +118,6 @@ @implementation _ASPendingState NSArray *accessibilityHeaderElements; CGPoint accessibilityActivationPoint; UIBezierPath *accessibilityPath; - UISemanticContentAttribute semanticContentAttribute; ASPendingStateFlags _flags; } @@ -181,7 +179,6 @@ ASDISPLAYNODE_INLINE void ASPendingStateApplyMetricsToLayer(_ASPendingState *sta @synthesize borderWidth=borderWidth; @synthesize borderColor=borderColor; @synthesize asyncdisplaykit_asyncTransactionContainer=asyncTransactionContainer; -@synthesize semanticContentAttribute=semanticContentAttribute; static CGColorRef blackColorRef = NULL; @@ -262,7 +259,6 @@ - (instancetype)init accessibilityActivationPoint = CGPointZero; accessibilityPath = nil; edgeAntialiasingMask = (kCALayerLeftEdge | kCALayerRightEdge | kCALayerTopEdge | kCALayerBottomEdge); - semanticContentAttribute = UISemanticContentAttributeUnspecified; return self; } @@ -516,12 +512,6 @@ - (void)asyncdisplaykit_setAsyncTransactionContainer:(BOOL)flag _flags.setAsyncTransactionContainer = YES; } -- (void)setSemanticContentAttribute:(UISemanticContentAttribute)attribute -{ - semanticContentAttribute = attribute; - _flags.setSemanticContentAttribute = YES; -} - - (BOOL)isAccessibilityElement { return isAccessibilityElement; @@ -914,10 +904,6 @@ - (void)applyToView:(UIView *)view withSpecialPropertiesHandling:(BOOL)specialPr if (flags.setOpaque) ASDisplayNodeAssert(view.layer.opaque == opaque, @"Didn't set opaque as desired"); - if (flags.setSemanticContentAttribute) { - view.semanticContentAttribute = semanticContentAttribute; - } - if (flags.setIsAccessibilityElement) view.isAccessibilityElement = isAccessibilityElement; @@ -1059,7 +1045,6 @@ + (_ASPendingState *)pendingViewStateFromView:(UIView *)view pendingState.allowsGroupOpacity = layer.allowsGroupOpacity; pendingState.allowsEdgeAntialiasing = layer.allowsEdgeAntialiasing; pendingState.edgeAntialiasingMask = layer.edgeAntialiasingMask; - pendingState.semanticContentAttribute = view.semanticContentAttribute; pendingState.isAccessibilityElement = view.isAccessibilityElement; pendingState.accessibilityLabel = view.accessibilityLabel; pendingState.accessibilityHint = view.accessibilityHint; @@ -1134,7 +1119,6 @@ - (BOOL)hasChanges || flags.needsLayout || flags.setAsyncTransactionContainer || flags.setOpaque - || flags.setSemanticContentAttribute || flags.setIsAccessibilityElement || flags.setAccessibilityLabel || flags.setAccessibilityHint