Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS11] Update project settings and fix errors #676

Merged
merged 4 commits into from
Nov 30, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions AsyncDisplayKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@
B350625C1B010F070018CF92 /* ASLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 0516FA3B1A15563400B4EBED /* ASLog.h */; settings = {ATTRIBUTES = (Public, ); }; };
B350625D1B0111740018CF92 /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 051943141A1575670030A7D0 /* Photos.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
B350625E1B0111780018CF92 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 051943121A1575630030A7D0 /* AssetsLibrary.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
BB5FC3D11F9C9389007F191E /* ASTabBarControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5FC3D01F9C9389007F191E /* ASTabBarControllerTests.m */; };
BB5FC3CE1F9BA689007F191E /* ASNavigationControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5FC3CD1F9BA688007F191E /* ASNavigationControllerTests.m */; };
BB5FC3D11F9C9389007F191E /* ASTabBarControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5FC3D01F9C9389007F191E /* ASTabBarControllerTests.m */; };
C78F7E2B1BF7809800CDEAFC /* ASTableNode.h in Headers */ = {isa = PBXBuildFile; fileRef = B0F880581BEAEC7500D17647 /* ASTableNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
CC034A091E60BEB400626263 /* ASDisplayNode+Convenience.h in Headers */ = {isa = PBXBuildFile; fileRef = CC034A071E60BEB400626263 /* ASDisplayNode+Convenience.h */; settings = {ATTRIBUTES = (Public, ); }; };
CC034A0A1E60BEB400626263 /* ASDisplayNode+Convenience.m in Sources */ = {isa = PBXBuildFile; fileRef = CC034A081E60BEB400626263 /* ASDisplayNode+Convenience.m */; };
Expand Down Expand Up @@ -785,8 +785,8 @@
B30BF6501C5964B0004FCD53 /* ASLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASLayoutManager.h; path = TextKit/ASLayoutManager.h; sourceTree = "<group>"; };
B30BF6511C5964B0004FCD53 /* ASLayoutManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ASLayoutManager.m; path = TextKit/ASLayoutManager.m; sourceTree = "<group>"; };
B35061DA1B010EDF0018CF92 /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BB5FC3D01F9C9389007F191E /* ASTabBarControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASTabBarControllerTests.m; sourceTree = "<group>"; };
BB5FC3CD1F9BA688007F191E /* ASNavigationControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASNavigationControllerTests.m; sourceTree = "<group>"; };
BB5FC3D01F9C9389007F191E /* ASTabBarControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASTabBarControllerTests.m; sourceTree = "<group>"; };
BDC2D162BD55A807C1475DA5 /* Pods-AsyncDisplayKitTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AsyncDisplayKitTests.profile.xcconfig"; path = "Pods/Target Support Files/Pods-AsyncDisplayKitTests/Pods-AsyncDisplayKitTests.profile.xcconfig"; sourceTree = "<group>"; };
CC034A071E60BEB400626263 /* ASDisplayNode+Convenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASDisplayNode+Convenience.h"; sourceTree = "<group>"; };
CC034A081E60BEB400626263 /* ASDisplayNode+Convenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ASDisplayNode+Convenience.m"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2069,13 +2069,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-AsyncDisplayKitTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
3B9D88CDF51B429C8409E4B6 /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -2428,14 +2431,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -2473,14 +2482,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -2616,14 +2631,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## master
* Add your own contributions to the next release on the line below this with your name.
- [iOS11] Update project settings and fix errors [Eke](https://github.com/Eke) [#676](https://github.com/TextureGroup/Texture/pull/676)
- [ASCollectionView] Improve performance and behavior of rotation / bounds changes. [Scott Goodson](https://github.com/appleguy) [#431](https://github.com/TextureGroup/Texture/pull/431)
- [ASCollectionView] Improve index space translation of Flow Layout Delegate methods. [Scott Goodson](https://github.com/appleguy)
- [Animated Image] Adds support for animated WebP as well as improves GIF handling. [#605](https://github.com/TextureGroup/Texture/pull/605) [Garrett Moon](https://github.com/garrettmoon)
Expand Down
4 changes: 2 additions & 2 deletions Source/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ - (instancetype)_initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionV
// Experiments done by Instagram show that this option being YES (default)
// when unused causes a significant hit to scroll performance.
// https://github.com/Instagram/IGListKit/issues/318
if (AS_AT_LEAST_IOS10) {
if (AS_AVAILABLE_IOS(10)) {
super.prefetchingEnabled = NO;
}

Expand Down Expand Up @@ -1972,7 +1972,7 @@ - (ASRangeController *)rangeController
/// The UIKit version of this method is only available on iOS >= 9
- (NSArray<NSIndexPath *> *)asdk_indexPathsForVisibleSupplementaryElementsOfKind:(NSString *)kind
{
if (NSFoundationVersionNumber >= NSFoundationVersionNumber_iOS_9_0) {
if (AS_AVAILABLE_IOS(9)) {
return [self indexPathsForVisibleSupplementaryElementsOfKind:kind];
}

Expand Down
2 changes: 1 addition & 1 deletion Source/ASDisplayNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ extern NSInteger const ASDefaultDrawingPriority;
*/
@property (nonatomic, assign) UIViewContentMode contentMode; // default=UIViewContentModeScaleToFill
@property (nonatomic, copy) NSString *contentsGravity; // Use .contentMode in preference when possible.
@property (nonatomic, assign) UISemanticContentAttribute semanticContentAttribute; // default=Unspecified
@property (nonatomic, assign) UISemanticContentAttribute semanticContentAttribute API_AVAILABLE(ios(9.0), tvos(9.0)); // default=Unspecified

@property (nonatomic, nullable) CGColorRef shadowColor; // default=opaque rgb black
@property (nonatomic, assign) CGFloat shadowOpacity; // default=0.0
Expand Down
2 changes: 1 addition & 1 deletion Source/ASImageNode+AnimatedImage.mm
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ - (void)displayLinkFired:(CADisplayLink *)displayLink
CFTimeInterval timeBetweenLastFire;
if (self.lastDisplayLinkFire == 0) {
timeBetweenLastFire = 0;
} else if (AS_AT_LEAST_IOS10){
} else if (AS_AVAILABLE_IOS(10)){
timeBetweenLastFire = displayLink.targetTimestamp - displayLink.timestamp;
} else {
timeBetweenLastFire = CACurrentMediaTime() - self.lastDisplayLinkFire;
Expand Down
2 changes: 1 addition & 1 deletion Source/ASTextNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ - (id)linkAttributeValueAtPoint:(CGPoint)point
}

- (id)_linkAttributeValueAtPoint:(CGPoint)point
attributeName:(out NSString **)attributeNameOut
attributeName:(out NSString * __autoreleasing *)attributeNameOut
range:(out NSRange *)rangeOut
inAdditionalTruncationMessage:(out BOOL *)inAdditionalTruncationMessageOut
forHighlighting:(BOOL)highlighting
Expand Down
43 changes: 38 additions & 5 deletions Source/Base/ASLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,44 @@ ASDISPLAYNODE_EXTERN_C_END
* The logging macros are not guarded by deployment-target checks like the activity macros are, but they are
* only available on iOS >= 9 at runtime, so just make them conditional.
*/
#define as_log_create(subsystem, category) (AS_AT_LEAST_IOS9 ? os_log_create(subsystem, category) : (os_log_t)0)
#define as_log_debug(log, format, ...) (AS_AT_LEAST_IOS9 ? os_log_debug(log, format, ##__VA_ARGS__) : (void)0)
#define as_log_info(log, format, ...) (AS_AT_LEAST_IOS9 ? os_log_info(log, format, ##__VA_ARGS__) : (void)0)
#define as_log_error(log, format, ...) (AS_AT_LEAST_IOS9 ? os_log_error(log, format, ##__VA_ARGS__) : (void)0)
#define as_log_fault(log, format, ...) (AS_AT_LEAST_IOS9 ? os_log_fault(log, format, ##__VA_ARGS__) : (void)0)

#define as_log_create(subsystem, category) ({ \
os_log_t __val; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the rest of the macros need to pass through their return value as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i did not miss anything, other macros don't need to pass through their return value as well.

if (AS_AVAILABLE_IOS(9)) { \
__val = os_log_create(subsystem, category); \
} else { \
__val = (os_log_t)0; \
} \
__val; \
})

#define as_log_debug(log, format, ...) \
if (AS_AVAILABLE_IOS(9)) { \
os_log_debug(log, format, ##__VA_ARGS__); \
} else { \
(void)0; \
} \

#define as_log_info(log, format, ...) \
if (AS_AVAILABLE_IOS(9)) { \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indent \

os_log_info(log, format, ##__VA_ARGS__); \
} else { \
(void)0; \
}\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here


#define as_log_error(log, format, ...) \
if (AS_AVAILABLE_IOS(9)) { \
os_log_error(log, format, ##__VA_ARGS__); \
} else { \
(void)0; \
} \

#define as_log_fault(log, format, ...) \
if (AS_AVAILABLE_IOS(9)) { \
os_log_fault(log, format, ##__VA_ARGS__); \
} else { \
(void)0; \
} \

#if ASEnableVerboseLogging
#define as_log_verbose(log, format, ...) as_log_debug(log, format, ##__VA_ARGS__)
Expand Down
2 changes: 1 addition & 1 deletion Source/Details/ASDataController.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ extern NSString * const ASCollectionInvalidUpdateException;
* The invalidationBlock is called after flushing the ASMainSerialQueue, which ensures that any in-progress
* layout calculations have been applied. The block will not be called if data hasn't been loaded.
*/
- (void)relayoutAllNodesWithInvalidationBlock:(nullable void (^)())invalidationBlock;
- (void)relayoutAllNodesWithInvalidationBlock:(nullable void (^)(void))invalidationBlock;

/**
* Re-measures given nodes in the backing store.
Expand Down
2 changes: 1 addition & 1 deletion Source/Details/ASPINRemoteImageDownloader.m
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ - (id)alternateRepresentationWithData:(NSData *)data options:(PINRemoteImageMana
* If queue is nil, assert and perform now.
* Otherwise, dispatch async to queue.
*/
+ (void)_performWithCallbackQueue:(dispatch_queue_t)queue work:(void (^)())work
+ (void)_performWithCallbackQueue:(dispatch_queue_t)queue work:(void (^)(void))work
{
if (work == nil) {
// No need to assert here, really. We aren't expecting any feedback from this method.
Expand Down
40 changes: 27 additions & 13 deletions Source/Details/ASTraitCollection.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ASPrimitiveTraitCollection ASPrimitiveTraitCollectionFromUITraitCollection(UITra
environmentTraitCollection.horizontalSizeClass = traitCollection.horizontalSizeClass;
environmentTraitCollection.verticalSizeClass = traitCollection.verticalSizeClass;
environmentTraitCollection.userInterfaceIdiom = traitCollection.userInterfaceIdiom;
if (AS_AT_LEAST_IOS9) {
if (AS_AVAILABLE_IOS(9)) {
environmentTraitCollection.forceTouchCapability = traitCollection.forceTouchCapability;
}
return environmentTraitCollection;
Expand All @@ -67,17 +67,28 @@ BOOL ASPrimitiveTraitCollectionIsEqualToASPrimitiveTraitCollection(ASPrimitiveTr

// Named so as not to conflict with a hidden Apple function, in case compiler decides not to inline
ASDISPLAYNODE_INLINE NSString *AS_NSStringFromUIUserInterfaceIdiom(UIUserInterfaceIdiom idiom) {
switch (idiom) {
case UIUserInterfaceIdiomTV:
return @"TV";
case UIUserInterfaceIdiomPad:
return @"Pad";
case UIUserInterfaceIdiomPhone:
return @"Phone";
case UIUserInterfaceIdiomCarPlay:
return @"CarPlay";
default:
return @"Unspecified";
if (AS_AVAILABLE_IOS(9)) {
switch (idiom) {
case UIUserInterfaceIdiomTV:
return @"TV";
case UIUserInterfaceIdiomPad:
return @"Pad";
case UIUserInterfaceIdiomPhone:
return @"Phone";
case UIUserInterfaceIdiomCarPlay:
return @"CarPlay";
default:
return @"Unspecified";
}
} else {
switch (idiom) {
case UIUserInterfaceIdiomPad:
return @"Pad";
case UIUserInterfaceIdiomPhone:
return @"Phone";
default:
return @"Unspecified";
}
}
}

Expand Down Expand Up @@ -167,7 +178,10 @@ + (instancetype)traitCollectionWithASPrimitiveTraitCollection:(ASPrimitiveTraitC
+ (instancetype)traitCollectionWithUITraitCollection:(UITraitCollection *)traitCollection
containerSize:(CGSize)windowSize
{
UIForceTouchCapability forceTouch = AS_AT_LEAST_IOS9 ? traitCollection.forceTouchCapability : UIForceTouchCapabilityUnknown;
UIForceTouchCapability forceTouch = UIForceTouchCapabilityUnknown;
if(AS_AVAILABLE_IOS(9)) {
forceTouch = traitCollection.forceTouchCapability;
}
return [self traitCollectionWithDisplayScale:traitCollection.displayScale
userInterfaceIdiom:traitCollection.userInterfaceIdiom
horizontalSizeClass:traitCollection.horizontalSizeClass
Expand Down
2 changes: 1 addition & 1 deletion Source/Details/UIView+ASConvenience.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ NS_ASSUME_NONNULL_BEGIN
@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) UISemanticContentAttribute semanticContentAttribute API_AVAILABLE(ios(9.0), tvos(9.0));
@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;
Expand Down
2 changes: 1 addition & 1 deletion Source/Private/ASTableView+Undeprecated.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ NS_ASSUME_NONNULL_BEGIN
* the main thread.
* @warning This method is substantially more expensive than UITableView's version.
*/
-(void)reloadDataWithCompletion:(void (^ _Nullable)())completion;
-(void)reloadDataWithCompletion:(void (^ _Nullable)(void))completion;

/**
* Reload everything from scratch, destroying the working range and all cached nodes.
Expand Down
18 changes: 12 additions & 6 deletions Source/Private/_ASPendingState.mm
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ @implementation _ASPendingState
NSArray *accessibilityHeaderElements;
CGPoint accessibilityActivationPoint;
UIBezierPath *accessibilityPath;
UISemanticContentAttribute semanticContentAttribute;
UISemanticContentAttribute semanticContentAttribute API_AVAILABLE(ios(9.0), tvos(9.0));

ASPendingStateFlags _flags;
}
Expand Down Expand Up @@ -295,7 +295,9 @@ - (instancetype)init
accessibilityActivationPoint = CGPointZero;
accessibilityPath = nil;
edgeAntialiasingMask = (kCALayerLeftEdge | kCALayerRightEdge | kCALayerTopEdge | kCALayerBottomEdge);
semanticContentAttribute = UISemanticContentAttributeUnspecified;
if (AS_AVAILABLE_IOS(9)) {
semanticContentAttribute = UISemanticContentAttributeUnspecified;
}

return self;
}
Expand Down Expand Up @@ -573,7 +575,7 @@ - (void)asyncdisplaykit_setAsyncTransactionContainer:(BOOL)flag
_flags.setAsyncTransactionContainer = YES;
}

- (void)setSemanticContentAttribute:(UISemanticContentAttribute)attribute {
- (void)setSemanticContentAttribute:(UISemanticContentAttribute)attribute API_AVAILABLE(ios(9.0), tvos(9.0)) {
semanticContentAttribute = attribute;
_flags.setSemanticContentAttribute = YES;
}
Expand Down Expand Up @@ -1049,8 +1051,10 @@ - (void)applyToView:(UIView *)view withSpecialPropertiesHandling:(BOOL)specialPr
if (flags.setOpaque)
ASDisplayNodeAssert(layer.opaque == opaque, @"Didn't set opaque as desired");

if (flags.setSemanticContentAttribute) {
view.semanticContentAttribute = semanticContentAttribute;
if (AS_AVAILABLE_IOS(9)) {
if (flags.setSemanticContentAttribute) {
view.semanticContentAttribute = semanticContentAttribute;
}
}

if (flags.setIsAccessibilityElement)
Expand Down Expand Up @@ -1211,7 +1215,9 @@ + (_ASPendingState *)pendingViewStateFromView:(UIView *)view
pendingState.allowsGroupOpacity = layer.allowsGroupOpacity;
pendingState.allowsEdgeAntialiasing = layer.allowsEdgeAntialiasing;
pendingState.edgeAntialiasingMask = layer.edgeAntialiasingMask;
pendingState.semanticContentAttribute = view.semanticContentAttribute;
if (AS_AVAILABLE_IOS(9)) {
pendingState.semanticContentAttribute = view.semanticContentAttribute;
}
pendingState.isAccessibilityElement = view.isAccessibilityElement;
pendingState.accessibilityLabel = view.accessibilityLabel;
pendingState.accessibilityHint = view.accessibilityHint;
Expand Down
Loading