diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 4f8b9a3c..e9659906 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -65,7 +65,7 @@ 254C6B8C1BF94F8A003EC431 /* ASTextKitTailTruncater.mm in Sources */ = {isa = PBXBuildFile; fileRef = 257754A21BEE44CD00737CA5 /* ASTextKitTailTruncater.mm */; }; 25E327571C16819500A2170C /* ASPagerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 25E327541C16819500A2170C /* ASPagerNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25E327591C16819500A2170C /* ASPagerNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 25E327551C16819500A2170C /* ASPagerNode.mm */; }; - 2767E9411BB19BD600EA9B77 /* ASViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = ACC945A81BA9E7A0005E1FB8 /* ASViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2767E9411BB19BD600EA9B77 /* ASDKViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = ACC945A81BA9E7A0005E1FB8 /* ASDKViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2911485C1A77147A005D0878 /* ASControlNodeTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2911485B1A77147A005D0878 /* ASControlNodeTests.mm */; }; 296A0A351A951ABF005ACEAA /* ASBatchFetchingTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 296A0A341A951ABF005ACEAA /* ASBatchFetchingTests.mm */; }; 29CDC2E21AAE70D000833CA4 /* ASBasicImageDownloaderContextTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CDC2E11AAE70D000833CA4 /* ASBasicImageDownloaderContextTests.mm */; }; @@ -198,7 +198,7 @@ 9C6BB3B31B8CC9C200F13F52 /* ASAbsoluteLayoutElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C6BB3B01B8CC9C200F13F52 /* ASAbsoluteLayoutElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9C70F2051CDA4F06007D6C76 /* ASTraitCollection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C70F2021CDA4EFA007D6C76 /* ASTraitCollection.mm */; }; 9C70F2061CDA4F0C007D6C76 /* ASTraitCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C70F2011CDA4EFA007D6C76 /* ASTraitCollection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9C70F2091CDABA36007D6C76 /* ASViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6BF1CCAC73C006A6476 /* ASViewController.mm */; }; + 9C70F2091CDABA36007D6C76 /* ASDKViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6BF1CCAC73C006A6476 /* ASDKViewController.mm */; }; 9C70F20A1CDBE949007D6C76 /* ASTableNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6C11CCAC768006A6476 /* ASTableNode.mm */; }; 9C70F20D1CDBE9CB007D6C76 /* ASDefaultPlayButton.h in Headers */ = {isa = PBXBuildFile; fileRef = AEB7B0181C5962EA00662EF4 /* ASDefaultPlayButton.h */; settings = {ATTRIBUTES = (Private, ); }; }; 9C70F20E1CDBE9E5007D6C76 /* NSArray+Diffing.h in Headers */ = {isa = PBXBuildFile; fileRef = DBC452D91C5BF64600B16017 /* NSArray+Diffing.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -390,7 +390,7 @@ CC8B05D61D73836400F54286 /* ASPerformanceTestContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = CC8B05D51D73836400F54286 /* ASPerformanceTestContext.mm */; }; CC8B05D81D73979700F54286 /* ASTextNodePerformanceTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CC8B05D71D73979700F54286 /* ASTextNodePerformanceTests.mm */; }; CC90E1F41E383C0400FED591 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B35061DA1B010EDF0018CF92 /* AsyncDisplayKit.framework */; }; - CCA221D31D6FA7EF00AF6A0F /* ASViewControllerTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CCA221D21D6FA7EF00AF6A0F /* ASViewControllerTests.mm */; }; + CCA221D31D6FA7EF00AF6A0F /* ASDKViewControllerTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CCA221D21D6FA7EF00AF6A0F /* ASDKViewControllerTests.mm */; }; CCA282B41E9EA7310037E8B7 /* ASTipsController.h in Headers */ = {isa = PBXBuildFile; fileRef = CCA282B21E9EA7310037E8B7 /* ASTipsController.h */; }; CCA282B51E9EA7310037E8B7 /* ASTipsController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CCA282B31E9EA7310037E8B7 /* ASTipsController.mm */; }; CCA282B81E9EA8E40037E8B7 /* AsyncDisplayKit+Tips.h in Headers */ = {isa = PBXBuildFile; fileRef = CCA282B61E9EA8E40037E8B7 /* AsyncDisplayKit+Tips.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -779,7 +779,7 @@ 9C70F2021CDA4EFA007D6C76 /* ASTraitCollection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASTraitCollection.mm; sourceTree = ""; }; 9C8898BA1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASTextKitFontSizeAdjuster.mm; path = TextKit/ASTextKitFontSizeAdjuster.mm; sourceTree = ""; }; 9CDC18CB1B910E12004965E2 /* ASLayoutElementPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASLayoutElementPrivate.h; sourceTree = ""; }; - 9CFFC6BF1CCAC73C006A6476 /* ASViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASViewController.mm; sourceTree = ""; }; + 9CFFC6BF1CCAC73C006A6476 /* ASDKViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASDKViewController.mm; sourceTree = ""; }; 9CFFC6C11CCAC768006A6476 /* ASTableNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASTableNode.mm; sourceTree = ""; }; 9D302F9A2231B07E005739C3 /* ASButtonNode+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ASButtonNode+Private.h"; sourceTree = ""; }; 9D302F9C2231B373005739C3 /* ASButtonNode+Yoga.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ASButtonNode+Yoga.h"; sourceTree = ""; }; @@ -803,7 +803,7 @@ AC6145421D8AFD4F003D62A2 /* ASSection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASSection.mm; path = ../Private/ASSection.mm; sourceTree = ""; }; AC6456071B0A335000CF11B8 /* ASCellNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASCellNode.mm; sourceTree = ""; }; AC7A2C161BDE11DF0093FE1A /* ASTableViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASTableViewInternal.h; sourceTree = ""; }; - ACC945A81BA9E7A0005E1FB8 /* ASViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASViewController.h; sourceTree = ""; }; + ACC945A81BA9E7A0005E1FB8 /* ASDKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASDKViewController.h; sourceTree = ""; }; ACE87A2B1D73696800D7FF06 /* ASSectionContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASSectionContext.h; path = Details/ASSectionContext.h; sourceTree = ""; }; ACF6ED011B17843500DA7C62 /* ASBackgroundLayoutSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASBackgroundLayoutSpec.h; sourceTree = ""; }; ACF6ED021B17843500DA7C62 /* ASBackgroundLayoutSpec.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = ASBackgroundLayoutSpec.mm; sourceTree = ""; }; @@ -923,7 +923,7 @@ CC8B05D41D73836400F54286 /* ASPerformanceTestContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASPerformanceTestContext.h; sourceTree = ""; }; CC8B05D51D73836400F54286 /* ASPerformanceTestContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASPerformanceTestContext.mm; sourceTree = ""; }; CC8B05D71D73979700F54286 /* ASTextNodePerformanceTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASTextNodePerformanceTests.mm; sourceTree = ""; }; - CCA221D21D6FA7EF00AF6A0F /* ASViewControllerTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASViewControllerTests.mm; sourceTree = ""; }; + CCA221D21D6FA7EF00AF6A0F /* ASDKViewControllerTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASDKViewControllerTests.mm; sourceTree = ""; }; CCA282B21E9EA7310037E8B7 /* ASTipsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASTipsController.h; sourceTree = ""; }; CCA282B31E9EA7310037E8B7 /* ASTipsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASTipsController.mm; sourceTree = ""; }; CCA282B61E9EA8E40037E8B7 /* AsyncDisplayKit+Tips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AsyncDisplayKit+Tips.h"; sourceTree = ""; }; @@ -1275,8 +1275,8 @@ AEEC47E01C20C2DD00EC1693 /* ASVideoNode.mm */, 8BDA5FC31CDBDDE1007D13B2 /* ASVideoPlayerNode.h */, 8BDA5FC41CDBDDE1007D13B2 /* ASVideoPlayerNode.mm */, - ACC945A81BA9E7A0005E1FB8 /* ASViewController.h */, - 9CFFC6BF1CCAC73C006A6476 /* ASViewController.mm */, + ACC945A81BA9E7A0005E1FB8 /* ASDKViewController.h */, + 9CFFC6BF1CCAC73C006A6476 /* ASDKViewController.mm */, 68FC85E71CE29C7D00EDD713 /* ASVisibilityProtocols.h */, 68FC85E81CE29C7D00EDD713 /* ASVisibilityProtocols.mm */, 6BDC61F51978FEA400E50D21 /* AsyncDisplayKit.h */, @@ -1386,7 +1386,7 @@ D933F040224AD17F00FF495E /* ASTransactionTests.mm */, CC0AEEA31D66316E005D1C78 /* ASUICollectionViewTests.mm */, AEEC47E31C21D3D200EC1693 /* ASVideoNodeTests.mm */, - CCA221D21D6FA7EF00AF6A0F /* ASViewControllerTests.mm */, + CCA221D21D6FA7EF00AF6A0F /* ASDKViewControllerTests.mm */, 83A7D95D1D446A6E00BF333E /* ASWeakMapTests.mm */, CC3B208D1C3F7D0A00798563 /* ASWeakSetTests.mm */, 695BE2541DC1245C008E6EA5 /* ASWrapperSpecSnapshotTests.mm */, @@ -2107,7 +2107,7 @@ CCA282B41E9EA7310037E8B7 /* ASTipsController.h in Headers */, 34EFC7711B701CFF00AD841F /* ASStackLayoutSpec.h in Headers */, CCA282C01E9EAE010037E8B7 /* ASTip.h in Headers */, - 2767E9411BB19BD600EA9B77 /* ASViewController.h in Headers */, + 2767E9411BB19BD600EA9B77 /* ASDKViewController.h in Headers */, 92DD2FE81BF4D0A80074C9DD /* ASMapNode.h in Headers */, 9C6BB3B31B8CC9C200F13F52 /* ASAbsoluteLayoutElement.h in Headers */, 34EFC7731B701D0700AD841F /* ASAbsoluteLayoutSpec.h in Headers */, @@ -2330,7 +2330,7 @@ ACF6ED5D1B178DC700DA7C62 /* ASDimensionTests.mm in Sources */, BB5FC3D11F9C9389007F191E /* ASTabBarControllerTests.mm in Sources */, 695BE2551DC1245C008E6EA5 /* ASWrapperSpecSnapshotTests.mm in Sources */, - CCA221D31D6FA7EF00AF6A0F /* ASViewControllerTests.mm in Sources */, + CCA221D31D6FA7EF00AF6A0F /* ASDKViewControllerTests.mm in Sources */, 058D0A38195D057000B7D73C /* ASDisplayLayerTests.mm in Sources */, 2538B6F31BC5D2A2003CA0B4 /* ASCollectionViewFlowLayoutInspectorTests.mm in Sources */, CC583AD61EF9BDBE00134156 /* ASTestCase.mm in Sources */, @@ -2405,7 +2405,7 @@ DEB8ED7C1DD003D300DBDE55 /* ASLayoutTransition.mm in Sources */, CCA5F62E1EECC2A80060C137 /* ASAssert.mm in Sources */, 9F98C0261DBE29E000476D92 /* ASControlTargetAction.mm in Sources */, - 9C70F2091CDABA36007D6C76 /* ASViewController.mm in Sources */, + 9C70F2091CDABA36007D6C76 /* ASDKViewController.mm in Sources */, 3917EBD51E9C2FC400D04A01 /* _ASCollectionReusableView.mm in Sources */, CCA282D11E9EBF6C0037E8B7 /* ASTipsWindow.mm in Sources */, CCCCCCE41EC3EF060087FE10 /* NSParagraphStyle+ASText.mm in Sources */, diff --git a/Source/ASCellNode.mm b/Source/ASCellNode.mm index 5bf648ca..208eb5f0 100644 --- a/Source/ASCellNode.mm +++ b/Source/ASCellNode.mm @@ -20,7 +20,7 @@ #import #import -#import +#import #import #import @@ -79,8 +79,8 @@ _viewController = _viewControllerBlock(); _viewControllerBlock = nil; - if ([_viewController isKindOfClass:[ASViewController class]]) { - ASViewController *asViewController = (ASViewController *)_viewController; + if ([_viewController isKindOfClass:[ASDKViewController class]]) { + ASDKViewController *asViewController = (ASDKViewController *)_viewController; _viewControllerNode = asViewController.node; [_viewController loadViewIfNeeded]; } else { diff --git a/Source/ASConfigurationInternal.h b/Source/ASConfigurationInternal.h index eb639c22..fa694962 100644 --- a/Source/ASConfigurationInternal.h +++ b/Source/ASConfigurationInternal.h @@ -34,12 +34,12 @@ NS_ASSUME_NONNULL_BEGIN /** * Internal function. Use the macro without the underbar. */ -AS_EXTERN BOOL _ASActivateExperimentalFeature(ASExperimentalFeatures option); +ASDK_EXTERN BOOL _ASActivateExperimentalFeature(ASExperimentalFeatures option); /** * Notify the configuration delegate that the framework initialized, if needed. */ -AS_EXTERN void ASNotifyInitialized(void); +ASDK_EXTERN void ASNotifyInitialized(void); AS_SUBCLASSING_RESTRICTED @interface ASConfigurationManager : NSObject diff --git a/Source/ASContextTransitioning.h b/Source/ASContextTransitioning.h index 9802ecef..aea3501b 100644 --- a/Source/ASContextTransitioning.h +++ b/Source/ASContextTransitioning.h @@ -14,8 +14,8 @@ NS_ASSUME_NONNULL_BEGIN -AS_EXTERN NSString * const ASTransitionContextFromLayoutKey; -AS_EXTERN NSString * const ASTransitionContextToLayoutKey; +ASDK_EXTERN NSString * const ASTransitionContextFromLayoutKey; +ASDK_EXTERN NSString * const ASTransitionContextToLayoutKey; @protocol ASContextTransitioning diff --git a/Source/ASViewController.h b/Source/ASDKViewController.h similarity index 83% rename from Source/ASViewController.h rename to Source/ASDKViewController.h index 89c02d6f..035b09e1 100644 --- a/Source/ASViewController.h +++ b/Source/ASDKViewController.h @@ -1,5 +1,5 @@ // -// ASViewController.h +// ASDKViewController.h // Texture // // Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. @@ -19,29 +19,29 @@ typedef ASTraitCollection * _Nonnull (^ASDisplayTraitsForTraitCollectionBlock)(U typedef ASTraitCollection * _Nonnull (^ASDisplayTraitsForTraitWindowSizeBlock)(CGSize windowSize); /** - * ASViewController allows you to have a completely node backed hierarchy. It automatically + * ASDKViewController allows you to have a completely node backed hierarchy. It automatically * handles @c ASVisibilityDepth, automatic range mode and propogating @c ASDisplayTraits to contained nodes. * * You can opt-out of node backed hierarchy and use it like a normal UIViewController. * More importantly, you can use it as a base class for all of your view controllers among which some use a node hierarchy and some don't. * See examples/ASDKgram project for actual implementation. */ -@interface ASViewController<__covariant DisplayNodeType : ASDisplayNode *> : UIViewController +@interface ASDKViewController<__covariant DisplayNodeType : ASDisplayNode *> : UIViewController /** - * ASViewController initializer. + * ASDKViewController initializer. * * @param node An ASDisplayNode which will provide the root view (self.view) - * @return An ASViewController instance whose root view will be backed by the provided ASDisplayNode. + * @return An ASDKViewController instance whose root view will be backed by the provided ASDisplayNode. * * @see ASVisibilityDepth */ - (instancetype)initWithNode:(DisplayNodeType)node NS_DESIGNATED_INITIALIZER; /** -* ASViewController initializer. Useful for interoperability with normal UIViewControllers. +* ASDKViewController initializer. Useful for interoperability with normal UIViewControllers. * -* @return An ASViewController instance with a nil node whose root view will be backed by a standard UIView as with a normal UIViewController. +* @return An ASDKViewController instance with a nil node whose root view will be backed by a standard UIView as with a normal UIViewController. * * @see ASVisibilityDepth */ @@ -86,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface ASViewController (ASRangeControllerUpdateRangeProtocol) +@interface ASDKViewController (ASRangeControllerUpdateRangeProtocol) /** * Automatically adjust range mode based on view events. If you set this to YES, the view controller or its node diff --git a/Source/ASViewController.mm b/Source/ASDKViewController.mm similarity index 96% rename from Source/ASViewController.mm rename to Source/ASDKViewController.mm index 8b889dfc..da4a19e8 100644 --- a/Source/ASViewController.mm +++ b/Source/ASDKViewController.mm @@ -1,5 +1,5 @@ // -// ASViewController.mm +// ASDKViewController.mm // Texture // // Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. @@ -7,14 +7,14 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // -#import +#import #import #import #import #import #import -@implementation ASViewController +@implementation ASDKViewController { BOOL _ensureDisplayed; BOOL _automaticallyAdjustRangeModeBasedOnViewEvents; @@ -185,7 +185,7 @@ ASVisibilityDidMoveToParentViewController; - (void)viewWillAppear:(BOOL)animated { - as_activity_create_for_scope("ASViewController will appear"); + as_activity_create_for_scope("ASDKViewController will appear"); os_log_debug(ASNodeLog(), "View controller %@ will appear", self); [super viewWillAppear:animated]; @@ -323,13 +323,13 @@ ASVisibilityDepthImplementation; ASPrimitiveTraitCollection oldTraitCollection = self.node.primitiveTraitCollection; if (ASPrimitiveTraitCollectionIsEqualToASPrimitiveTraitCollection(traitCollection, oldTraitCollection) == NO) { - as_activity_scope_verbose(as_activity_create("Propagate ASViewController trait collection", AS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT)); + as_activity_scope_verbose(as_activity_create("Propagate ASDKViewController trait collection", AS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT)); os_log_debug(ASNodeLog(), "Propagating new traits for %@: %@", self, NSStringFromASPrimitiveTraitCollection(traitCollection)); ASTraitCollectionPropagateDown(self.node, traitCollection); // Once we've propagated all the traits, layout this node. // Remeasure the node with the latest constrained size – old constrained size may be incorrect. - as_activity_scope_verbose(as_activity_create("Layout ASViewController node with new traits", AS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT)); + as_activity_scope_verbose(as_activity_create("Layout ASDKViewController node with new traits", AS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT)); [_node layoutThatFits:[self nodeConstrainedSize]]; } } diff --git a/Source/ASDisplayNode+Beta.h b/Source/ASDisplayNode+Beta.h index 4a8f4f45..882042a9 100644 --- a/Source/ASDisplayNode+Beta.h +++ b/Source/ASDisplayNode+Beta.h @@ -19,8 +19,8 @@ NS_ASSUME_NONNULL_BEGIN -AS_EXTERN void ASPerformBlockOnMainThread(void (^block)(void)); -AS_EXTERN void ASPerformBlockOnBackgroundThread(void (^block)(void)); // DISPATCH_QUEUE_PRIORITY_DEFAULT +ASDK_EXTERN void ASPerformBlockOnMainThread(void (^block)(void)); +ASDK_EXTERN void ASPerformBlockOnBackgroundThread(void (^block)(void)); // DISPATCH_QUEUE_PRIORITY_DEFAULT /** * Bitmask to indicate what performance measurements the cell should record. diff --git a/Source/ASDisplayNode+InterfaceState.h b/Source/ASDisplayNode+InterfaceState.h index 273cf6cb..96ff7032 100644 --- a/Source/ASDisplayNode+InterfaceState.h +++ b/Source/ASDisplayNode+InterfaceState.h @@ -9,7 +9,7 @@ #import /** - * Interface state is available on ASDisplayNode and ASViewController, and + * Interface state is available on ASDisplayNode and ASDKViewController, and * allows checking whether a node is in an interface situation where it is prudent to trigger certain * actions: measurement, data loading, display, and visibility (the latter for animations or other onscreen-only effects). * diff --git a/Source/ASDisplayNode+Layout.mm b/Source/ASDisplayNode+Layout.mm index 25d44b87..ab99d3ae 100644 --- a/Source/ASDisplayNode+Layout.mm +++ b/Source/ASDisplayNode+Layout.mm @@ -298,7 +298,7 @@ ASLayoutElementStyleExtensibilityForwarding // TODO // We should remove this logic, which is relatively new, and instead // rely on the parent / host of the root node to do this size change. That's always been the -// expectation with other node containers like ASTableView, ASCollectionView, ASViewController, etc. +// expectation with other node containers like ASTableView, ASCollectionView, ASDKViewController, etc. // E.g. in ASCellNode the _interactionDelegate is a Table or Collection that will resize in this // case. By resizing without participating with the parent, we could get cases where our parent size // does not match, especially if there is a size constraint that is applied at that level. diff --git a/Source/ASDisplayNode+Yoga.h b/Source/ASDisplayNode+Yoga.h index ac6b9217..000bb90e 100644 --- a/Source/ASDisplayNode+Yoga.h +++ b/Source/ASDisplayNode+Yoga.h @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN @class ASLayout; -AS_EXTERN void ASDisplayNodePerformBlockOnEveryYogaChild(ASDisplayNode * _Nullable node, void(^block)(ASDisplayNode *node)); +ASDK_EXTERN void ASDisplayNodePerformBlockOnEveryYogaChild(ASDisplayNode * _Nullable node, void(^block)(ASDisplayNode *node)); @interface ASDisplayNode (Yoga) diff --git a/Source/ASDisplayNode.h b/Source/ASDisplayNode.h index 7f506a03..eff930cc 100644 --- a/Source/ASDisplayNode.h +++ b/Source/ASDisplayNode.h @@ -76,7 +76,7 @@ typedef NS_ENUM(unsigned char, ASCornerRoundingType) { /** * Default drawing priority for display node */ -AS_EXTERN NSInteger const ASDefaultDrawingPriority; +ASDK_EXTERN NSInteger const ASDefaultDrawingPriority; /** * An `ASDisplayNode` is an abstraction over `UIView` and `CALayer` that allows you to perform calculations about a view diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index 20643f95..abb339bd 100644 --- a/Source/ASDisplayNode.mm +++ b/Source/ASDisplayNode.mm @@ -1377,7 +1377,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) { // This recursion must handle layers in various states: // 1. Just added to hierarchy, CA hasn't yet called -display - // 2. Previously in a hierarchy (such as a working window owned by an Intelligent Preloading class, like ASTableView / ASCollectionView / ASViewController) + // 2. Previously in a hierarchy (such as a working window owned by an Intelligent Preloading class, like ASTableView / ASCollectionView / ASDKViewController) // 3. Has no content to display at all // Specifically for case 1), we need to explicitly trigger a -display call now. // Otherwise, there is no opportunity to block the main thread after CoreAnimation's transaction commit diff --git a/Source/ASDisplayNodeExtras.h b/Source/ASDisplayNodeExtras.h index 09512ead..03f29404 100644 --- a/Source/ASDisplayNodeExtras.h +++ b/Source/ASDisplayNodeExtras.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN /// For deallocation of objects on the main thread across multiple run loops. -AS_EXTERN void ASPerformMainThreadDeallocation(id _Nullable __strong * _Nonnull objectPtr); +ASDK_EXTERN void ASPerformMainThreadDeallocation(id _Nullable __strong * _Nonnull objectPtr); // Because inline methods can't be extern'd and need to be part of the translation unit of code // that compiles with them to actually inline, we both declare and define these in the header. @@ -101,22 +101,22 @@ __unused static NSString *NSStringFromASInterfaceStateChange(ASInterfaceState ol /** Returns the appropriate interface state for a given ASDisplayNode and window */ -AS_EXTERN ASInterfaceState ASInterfaceStateForDisplayNode(ASDisplayNode *displayNode, UIWindow *window) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN ASInterfaceState ASInterfaceStateForDisplayNode(ASDisplayNode *displayNode, UIWindow *window) AS_WARN_UNUSED_RESULT; /** Given a layer, returns the associated display node, if any. */ -AS_EXTERN ASDisplayNode * _Nullable ASLayerToDisplayNode(CALayer * _Nullable layer) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN ASDisplayNode * _Nullable ASLayerToDisplayNode(CALayer * _Nullable layer) AS_WARN_UNUSED_RESULT; /** Given a view, returns the associated display node, if any. */ -AS_EXTERN ASDisplayNode * _Nullable ASViewToDisplayNode(UIView * _Nullable view) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN ASDisplayNode * _Nullable ASViewToDisplayNode(UIView * _Nullable view) AS_WARN_UNUSED_RESULT; /** Given a node, returns the root of the node hierarchy (where supernode == nil) */ -AS_EXTERN ASDisplayNode *ASDisplayNodeUltimateParentOfNode(ASDisplayNode *node) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN ASDisplayNode *ASDisplayNodeUltimateParentOfNode(ASDisplayNode *node) AS_WARN_UNUSED_RESULT; /** If traverseSublayers == YES, this function will walk the layer hierarchy, spanning discontinuous sections of the node hierarchy\ @@ -124,39 +124,39 @@ AS_EXTERN ASDisplayNode *ASDisplayNodeUltimateParentOfNode(ASDisplayNode *node) In the event that a node's backing layer is not created yet, the function will only walk the direct subnodes instead of forcing the layer hierarchy to be created. */ -AS_EXTERN void ASDisplayNodePerformBlockOnEveryNode(CALayer * _Nullable layer, ASDisplayNode * _Nullable node, BOOL traverseSublayers, void(^block)(ASDisplayNode *node)); +ASDK_EXTERN void ASDisplayNodePerformBlockOnEveryNode(CALayer * _Nullable layer, ASDisplayNode * _Nullable node, BOOL traverseSublayers, void(^block)(ASDisplayNode *node)); /** This function will walk the node hierarchy in a breadth first fashion. It does run the block on the node provided directly to the function call. It does NOT traverse sublayers. */ -AS_EXTERN void ASDisplayNodePerformBlockOnEveryNodeBFS(ASDisplayNode *node, void(^block)(ASDisplayNode *node)); +ASDK_EXTERN void ASDisplayNodePerformBlockOnEveryNodeBFS(ASDisplayNode *node, void(^block)(ASDisplayNode *node)); /** Identical to ASDisplayNodePerformBlockOnEveryNode, except it does not run the block on the node provided directly to the function call - only on all descendants. */ -AS_EXTERN void ASDisplayNodePerformBlockOnEverySubnode(ASDisplayNode *node, BOOL traverseSublayers, void(^block)(ASDisplayNode *node)); +ASDK_EXTERN void ASDisplayNodePerformBlockOnEverySubnode(ASDisplayNode *node, BOOL traverseSublayers, void(^block)(ASDisplayNode *node)); /** Given a display node, traverses up the layer tree hierarchy, returning the first display node that passes block. */ -AS_EXTERN ASDisplayNode * _Nullable ASDisplayNodeFindFirstSupernode(ASDisplayNode * _Nullable node, BOOL (^block)(ASDisplayNode *node)) AS_WARN_UNUSED_RESULT ASDISPLAYNODE_DEPRECATED_MSG("Use the `supernodes` property instead."); +ASDK_EXTERN ASDisplayNode * _Nullable ASDisplayNodeFindFirstSupernode(ASDisplayNode * _Nullable node, BOOL (^block)(ASDisplayNode *node)) AS_WARN_UNUSED_RESULT ASDISPLAYNODE_DEPRECATED_MSG("Use the `supernodes` property instead."); /** Given a display node, traverses up the layer tree hierarchy, returning the first display node of kind class. */ -AS_EXTERN __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSupernodeOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT ASDISPLAYNODE_DEPRECATED_MSG("Use the `supernodeOfClass:includingSelf:` method instead."); +ASDK_EXTERN __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSupernodeOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT ASDISPLAYNODE_DEPRECATED_MSG("Use the `supernodeOfClass:includingSelf:` method instead."); /** * Given a layer, find the window it lives in, if any. */ -AS_EXTERN UIWindow * _Nullable ASFindWindowOfLayer(CALayer *layer) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN UIWindow * _Nullable ASFindWindowOfLayer(CALayer *layer) AS_WARN_UNUSED_RESULT; /** * Given a layer, find the closest view it lives in, if any. */ -AS_EXTERN UIView * _Nullable ASFindClosestViewOfLayer(CALayer *layer) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN UIView * _Nullable ASFindClosestViewOfLayer(CALayer *layer) AS_WARN_UNUSED_RESULT; /** * Given two nodes, finds their most immediate common parent. Used for geometry conversion methods. @@ -166,48 +166,48 @@ AS_EXTERN UIView * _Nullable ASFindClosestViewOfLayer(CALayer *layer) AS_WARN_UN * undefined and undocumented behavior of UIKit in ASDisplayNode, this operation is defined to be incorrect in all * circumstances and must be fixed wherever encountered. */ -AS_EXTERN ASDisplayNode * _Nullable ASDisplayNodeFindClosestCommonAncestor(ASDisplayNode *node1, ASDisplayNode *node2) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN ASDisplayNode * _Nullable ASDisplayNodeFindClosestCommonAncestor(ASDisplayNode *node1, ASDisplayNode *node2) AS_WARN_UNUSED_RESULT; /** Given a display node, collects all descendants. This is a specialization of ASCollectContainer() that walks the Core Animation layer tree as opposed to the display node tree, thus supporting non-continues display node hierarchies. */ -AS_EXTERN NSArray *ASCollectDisplayNodes(ASDisplayNode *node) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN NSArray *ASCollectDisplayNodes(ASDisplayNode *node) AS_WARN_UNUSED_RESULT; /** Given a display node, traverses down the node hierarchy, returning all the display nodes that pass the block. */ -AS_EXTERN NSArray *ASDisplayNodeFindAllSubnodes(ASDisplayNode *start, BOOL (^block)(ASDisplayNode *node)) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN NSArray *ASDisplayNodeFindAllSubnodes(ASDisplayNode *start, BOOL (^block)(ASDisplayNode *node)) AS_WARN_UNUSED_RESULT; /** Given a display node, traverses down the node hierarchy, returning all the display nodes of kind class. */ -AS_EXTERN NSArray<__kindof ASDisplayNode *> *ASDisplayNodeFindAllSubnodesOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN NSArray<__kindof ASDisplayNode *> *ASDisplayNodeFindAllSubnodesOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT; /** Given a display node, traverses down the node hierarchy, returning the depth-first display node, including the start node that pass the block. */ -AS_EXTERN __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstNode(ASDisplayNode *start, BOOL (^block)(ASDisplayNode *node)) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstNode(ASDisplayNode *start, BOOL (^block)(ASDisplayNode *node)) AS_WARN_UNUSED_RESULT; /** Given a display node, traverses down the node hierarchy, returning the depth-first display node, excluding the start node, that pass the block */ -AS_EXTERN __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSubnode(ASDisplayNode *start, BOOL (^block)(ASDisplayNode *node)) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSubnode(ASDisplayNode *start, BOOL (^block)(ASDisplayNode *node)) AS_WARN_UNUSED_RESULT; /** Given a display node, traverses down the node hierarchy, returning the depth-first display node of kind class. */ -AS_EXTERN __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSubnodeOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSubnodeOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT; -AS_EXTERN UIColor *ASDisplayNodeDefaultPlaceholderColor(void) AS_WARN_UNUSED_RESULT; -AS_EXTERN UIColor *ASDisplayNodeDefaultTintColor(void) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN UIColor *ASDisplayNodeDefaultPlaceholderColor(void) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN UIColor *ASDisplayNodeDefaultTintColor(void) AS_WARN_UNUSED_RESULT; /** Disable willAppear / didAppear / didDisappear notifications for a sub-hierarchy, then re-enable when done. Nested calls are supported. */ -AS_EXTERN void ASDisplayNodeDisableHierarchyNotifications(ASDisplayNode *node); -AS_EXTERN void ASDisplayNodeEnableHierarchyNotifications(ASDisplayNode *node); +ASDK_EXTERN void ASDisplayNodeDisableHierarchyNotifications(ASDisplayNode *node); +ASDK_EXTERN void ASDisplayNodeEnableHierarchyNotifications(ASDisplayNode *node); // Not to be called directly. -AS_EXTERN void _ASSetDebugNames(Class owningClass, NSString *names, ASDisplayNode * _Nullable object, ...); +ASDK_EXTERN void _ASSetDebugNames(Class owningClass, NSString *names, ASDisplayNode * _Nullable object, ...); NS_ASSUME_NONNULL_END diff --git a/Source/ASExperimentalFeatures.h b/Source/ASExperimentalFeatures.h index 306c57d4..7729e2e3 100644 --- a/Source/ASExperimentalFeatures.h +++ b/Source/ASExperimentalFeatures.h @@ -33,9 +33,9 @@ typedef NS_OPTIONS(NSUInteger, ASExperimentalFeatures) { }; /// Convert flags -> name array. -AS_EXTERN NSArray *ASExperimentalFeaturesGetNames(ASExperimentalFeatures flags); +ASDK_EXTERN NSArray *ASExperimentalFeaturesGetNames(ASExperimentalFeatures flags); /// Convert name array -> flags. -AS_EXTERN ASExperimentalFeatures ASExperimentalFeaturesFromArray(NSArray *array); +ASDK_EXTERN ASExperimentalFeatures ASExperimentalFeaturesFromArray(NSArray *array); NS_ASSUME_NONNULL_END diff --git a/Source/ASImageNode.h b/Source/ASImageNode.h index 6c71eaa0..dcdb1106 100644 --- a/Source/ASImageNode.h +++ b/Source/ASImageNode.h @@ -195,7 +195,7 @@ typedef UIImage * _Nullable (^asimagenode_modification_block_t)(UIImage *image, * * @return An ASImageNode image modification block. */ -AS_EXTERN asimagenode_modification_block_t ASImageNodeRoundBorderModificationBlock(CGFloat borderWidth, UIColor * _Nullable borderColor); +ASDK_EXTERN asimagenode_modification_block_t ASImageNodeRoundBorderModificationBlock(CGFloat borderWidth, UIColor * _Nullable borderColor); /** * @abstract Image modification block that applies a tint color à la UIImage configured with @@ -207,6 +207,6 @@ AS_EXTERN asimagenode_modification_block_t ASImageNodeRoundBorderModificationBlo * * @return An ASImageNode image modification block. */ -AS_EXTERN asimagenode_modification_block_t ASImageNodeTintColorModificationBlock(UIColor *color); +ASDK_EXTERN asimagenode_modification_block_t ASImageNodeTintColorModificationBlock(UIColor *color); NS_ASSUME_NONNULL_END diff --git a/Source/ASMultiplexImageNode.h b/Source/ASMultiplexImageNode.h index aad731dd..72a913a9 100644 --- a/Source/ASMultiplexImageNode.h +++ b/Source/ASMultiplexImageNode.h @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN typedef id ASImageIdentifier; -AS_EXTERN NSString *const ASMultiplexImageNodeErrorDomain; +ASDK_EXTERN NSString *const ASMultiplexImageNodeErrorDomain; /** * ASMultiplexImageNode error codes. diff --git a/Source/ASNavigationController.h b/Source/ASNavigationController.h index cd6e417d..0d259b24 100644 --- a/Source/ASNavigationController.h +++ b/Source/ASNavigationController.h @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN * * @discussion ASNavigationController is a drop in replacement for UINavigationController * which improves memory efficiency by implementing the @c ASManagesChildVisibilityDepth protocol. - * You can use ASNavigationController with regular UIViewControllers, as well as ASViewControllers. + * You can use ASNavigationController with regular UIViewControllers, as well as ASDKViewControllers. * It is safe to subclass or use even where AsyncDisplayKit is not adopted. * * @see ASManagesChildVisibilityDepth diff --git a/Source/ASVisibilityProtocols.h b/Source/ASVisibilityProtocols.h index f350a344..b9f5c7ba 100644 --- a/Source/ASVisibilityProtocols.h +++ b/Source/ASVisibilityProtocols.h @@ -14,13 +14,13 @@ NS_ASSUME_NONNULL_BEGIN @class UIViewController; -AS_EXTERN ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth); +ASDK_EXTERN ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth); /** * ASVisibilityDepth * * @discussion "Visibility Depth" represents the number of user actions required to make an ASDisplayNode or - * ASViewController visibile. AsyncDisplayKit uses this information to intelligently manage memory and focus + * ASDKViewController visibile. AsyncDisplayKit uses this information to intelligently manage memory and focus * resources where they are most visible to the user. * * The ASVisibilityDepth protocol describes how custom view controllers can integrate with this system. @@ -55,11 +55,11 @@ AS_EXTERN ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visib * If implemented by a view controller container, use this method to notify child view controllers that their view * depth has changed @see ASNavigationController.m * - * If implemented on an ASViewController, use this method to reduce or increase the resources that your + * If implemented on an ASDKViewController, use this method to reduce or increase the resources that your * view controller uses. A higher visibility depth view controller should decrease it's resource usage, a lower * visibility depth controller should pre-warm resources in preperation for a display at 0 depth. * - * ASViewController implements this method and reduces / increases range mode of supporting nodes (such as ASCollectionNode + * ASDKViewController implements this method and reduces / increases range mode of supporting nodes (such as ASCollectionNode * and ASTableNode). * * @see visibilityDepth diff --git a/Source/AsyncDisplayKit.h b/Source/AsyncDisplayKit.h index 59e9aeec..2ac6e9b0 100644 --- a/Source/AsyncDisplayKit.h +++ b/Source/AsyncDisplayKit.h @@ -64,7 +64,7 @@ #import #import -#import +#import #import #import #import diff --git a/Source/Base/ASAssert.h b/Source/Base/ASAssert.h index f00ce967..4445b244 100644 --- a/Source/Base/ASAssert.h +++ b/Source/Base/ASAssert.h @@ -74,11 +74,11 @@ */ #pragma mark - Main Thread Assertions Disabling -AS_EXTERN BOOL ASMainThreadAssertionsAreDisabled(void); +ASDK_EXTERN BOOL ASMainThreadAssertionsAreDisabled(void); -AS_EXTERN void ASPushMainThreadAssertionsDisabled(void); +ASDK_EXTERN void ASPushMainThreadAssertionsDisabled(void); -AS_EXTERN void ASPopMainThreadAssertionsDisabled(void); +ASDK_EXTERN void ASPopMainThreadAssertionsDisabled(void); #pragma mark - Non-Fatal Assertions diff --git a/Source/Base/ASBaseDefines.h b/Source/Base/ASBaseDefines.h index 92b6d8fa..53ea66a0 100644 --- a/Source/Base/ASBaseDefines.h +++ b/Source/Base/ASBaseDefines.h @@ -9,7 +9,7 @@ #import -#define AS_EXTERN FOUNDATION_EXTERN +#define ASDK_EXTERN FOUNDATION_EXTERN #define unowned __unsafe_unretained /** diff --git a/Source/Base/ASLog.h b/Source/Base/ASLog.h index e21f8519..fb0eb574 100644 --- a/Source/Base/ASLog.h +++ b/Source/Base/ASLog.h @@ -30,7 +30,7 @@ * are at the `debug` log level, which the system * disables in production. */ -AS_EXTERN void ASDisableLogging(void); +ASDK_EXTERN void ASDisableLogging(void); /** * Restore logging that has been runtime-disabled via ASDisableLogging(). @@ -40,38 +40,38 @@ AS_EXTERN void ASDisableLogging(void); * configuration. This can be used in conjunction with ASDisableLogging() * to allow logging to be toggled off and back on at runtime. */ -AS_EXTERN void ASEnableLogging(void); +ASDK_EXTERN void ASEnableLogging(void); /// Log for general node events e.g. interfaceState, didLoad. #define ASNodeLogEnabled 1 -AS_EXTERN os_log_t ASNodeLog(void); +ASDK_EXTERN os_log_t ASNodeLog(void); /// Log for layout-specific events e.g. calculateLayout. #define ASLayoutLogEnabled 1 -AS_EXTERN os_log_t ASLayoutLog(void); +ASDK_EXTERN os_log_t ASLayoutLog(void); /// Log for display-specific events e.g. display queue batches. #define ASDisplayLogEnabled 1 -AS_EXTERN os_log_t ASDisplayLog(void); +ASDK_EXTERN os_log_t ASDisplayLog(void); /// Log for collection events e.g. reloadData, performBatchUpdates. #define ASCollectionLogEnabled 1 -AS_EXTERN os_log_t ASCollectionLog(void); +ASDK_EXTERN os_log_t ASCollectionLog(void); /// Log for ASNetworkImageNode and ASMultiplexImageNode events. #define ASImageLoadingLogEnabled 1 -AS_EXTERN os_log_t ASImageLoadingLog(void); +ASDK_EXTERN os_log_t ASImageLoadingLog(void); /// Specialized log for our main thread deallocation trampoline. #define ASMainThreadDeallocationLogEnabled 0 -AS_EXTERN os_log_t ASMainThreadDeallocationLog(void); +ASDK_EXTERN os_log_t ASMainThreadDeallocationLog(void); #define ASLockingLogEnabled 0 -AS_EXTERN os_log_t ASLockingLog(void); +ASDK_EXTERN os_log_t ASLockingLog(void); #if AS_HAS_OS_SIGNPOST /// Uses the special POI category for Instruments. Used by ASSignpost.h. -AS_EXTERN os_log_t ASPointsOfInterestLog(void); +ASDK_EXTERN os_log_t ASPointsOfInterestLog(void); #endif /** diff --git a/Source/Details/ASAbstractLayoutController.h b/Source/Details/ASAbstractLayoutController.h index 6de7801f..4cc7b3ae 100644 --- a/Source/Details/ASAbstractLayoutController.h +++ b/Source/Details/ASAbstractLayoutController.h @@ -12,11 +12,11 @@ NS_ASSUME_NONNULL_BEGIN -AS_EXTERN ASDirectionalScreenfulBuffer ASDirectionalScreenfulBufferHorizontal(ASScrollDirection scrollDirection, ASRangeTuningParameters rangeTuningParameters); +ASDK_EXTERN ASDirectionalScreenfulBuffer ASDirectionalScreenfulBufferHorizontal(ASScrollDirection scrollDirection, ASRangeTuningParameters rangeTuningParameters); -AS_EXTERN ASDirectionalScreenfulBuffer ASDirectionalScreenfulBufferVertical(ASScrollDirection scrollDirection, ASRangeTuningParameters rangeTuningParameters); +ASDK_EXTERN ASDirectionalScreenfulBuffer ASDirectionalScreenfulBufferVertical(ASScrollDirection scrollDirection, ASRangeTuningParameters rangeTuningParameters); -AS_EXTERN CGRect CGRectExpandToRangeWithScrollableDirections(CGRect rect, ASRangeTuningParameters tuningParameters, ASScrollDirection scrollableDirections, ASScrollDirection scrollDirection); +ASDK_EXTERN CGRect CGRectExpandToRangeWithScrollableDirections(CGRect rect, ASRangeTuningParameters tuningParameters, ASScrollDirection scrollableDirections, ASScrollDirection scrollDirection); @interface ASAbstractLayoutController : NSObject diff --git a/Source/Details/ASCollectionViewLayoutInspector.h b/Source/Details/ASCollectionViewLayoutInspector.h index a1ddb347..4e58890f 100644 --- a/Source/Details/ASCollectionViewLayoutInspector.h +++ b/Source/Details/ASCollectionViewLayoutInspector.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN -AS_EXTERN ASSizeRange NodeConstrainedSizeForScrollDirection(ASCollectionView *collectionView); +ASDK_EXTERN ASSizeRange NodeConstrainedSizeForScrollDirection(ASCollectionView *collectionView); @protocol ASCollectionViewLayoutInspecting diff --git a/Source/Details/ASDataController.h b/Source/Details/ASDataController.h index 099137ad..88150cba 100644 --- a/Source/Details/ASDataController.h +++ b/Source/Details/ASDataController.h @@ -32,8 +32,8 @@ NS_ASSUME_NONNULL_BEGIN typedef NSUInteger ASDataControllerAnimationOptions; -AS_EXTERN NSString * const ASDataControllerRowNodeKind; -AS_EXTERN NSString * const ASCollectionInvalidUpdateException; +ASDK_EXTERN NSString * const ASDataControllerRowNodeKind; +ASDK_EXTERN NSString * const ASCollectionInvalidUpdateException; /** Data source for data controller diff --git a/Source/Details/ASGraphicsContext.h b/Source/Details/ASGraphicsContext.h index 02c18f1a..5bd15376 100644 --- a/Source/Details/ASGraphicsContext.h +++ b/Source/Details/ASGraphicsContext.h @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN * * @return The rendered image. You can also render intermediary images using UIGraphicsGetImageFromCurrentImageContext. */ -AS_EXTERN UIImage *ASGraphicsCreateImageWithOptions(CGSize size, BOOL opaque, CGFloat scale, UIImage * _Nullable sourceImage, asdisplaynode_iscancelled_block_t NS_NOESCAPE _Nullable isCancelled, void (NS_NOESCAPE ^work)(void)) ASDISPLAYNODE_DEPRECATED_MSG("Use ASGraphicsCreateImageWithTraitCollectionAndOptions instead"); +ASDK_EXTERN UIImage *ASGraphicsCreateImageWithOptions(CGSize size, BOOL opaque, CGFloat scale, UIImage * _Nullable sourceImage, asdisplaynode_iscancelled_block_t NS_NOESCAPE _Nullable isCancelled, void (NS_NOESCAPE ^work)(void)) ASDISPLAYNODE_DEPRECATED_MSG("Use ASGraphicsCreateImageWithTraitCollectionAndOptions instead"); /** * A wrapper for the UIKit drawing APIs. If you are in ASExperimentalDrawingGlobal, and you have iOS >= 10, we will create @@ -45,7 +45,7 @@ AS_EXTERN UIImage *ASGraphicsCreateImageWithOptions(CGSize size, BOOL opaque, CG * * @return The rendered image. You can also render intermediary images using UIGraphicsGetImageFromCurrentImageContext. */ -AS_EXTERN UIImage *ASGraphicsCreateImage(ASPrimitiveTraitCollection traitCollection, CGSize size, BOOL opaque, CGFloat scale, UIImage * _Nullable sourceImage, asdisplaynode_iscancelled_block_t _Nullable NS_NOESCAPE isCancelled, void (NS_NOESCAPE ^work)(void)); +ASDK_EXTERN UIImage *ASGraphicsCreateImage(ASPrimitiveTraitCollection traitCollection, CGSize size, BOOL opaque, CGFloat scale, UIImage * _Nullable sourceImage, asdisplaynode_iscancelled_block_t _Nullable NS_NOESCAPE isCancelled, void (NS_NOESCAPE ^work)(void)); /** * A wrapper for the UIKit drawing APIs. @@ -60,6 +60,6 @@ AS_EXTERN UIImage *ASGraphicsCreateImage(ASPrimitiveTraitCollection traitCollect * * @return The rendered image. You can also render intermediary images using UIGraphicsGetImageFromCurrentImageContext. */ -AS_EXTERN UIImage *ASGraphicsCreateImageWithTraitCollectionAndOptions(ASPrimitiveTraitCollection traitCollection, CGSize size, BOOL opaque, CGFloat scale, UIImage * _Nullable sourceImage, void (NS_NOESCAPE ^work)(void)) ASDISPLAYNODE_DEPRECATED_MSG("Use ASGraphicsCreateImage instead"); +ASDK_EXTERN UIImage *ASGraphicsCreateImageWithTraitCollectionAndOptions(ASPrimitiveTraitCollection traitCollection, CGSize size, BOOL opaque, CGFloat scale, UIImage * _Nullable sourceImage, void (NS_NOESCAPE ^work)(void)) ASDISPLAYNODE_DEPRECATED_MSG("Use ASGraphicsCreateImage instead"); NS_ASSUME_NONNULL_END diff --git a/Source/Details/ASHashing.h b/Source/Details/ASHashing.h index 084d7407..42a4a98b 100644 --- a/Source/Details/ASHashing.h +++ b/Source/Details/ASHashing.h @@ -35,6 +35,6 @@ NS_ASSUME_NONNULL_BEGIN * use `pragma clang diagnostic warning "-Wpadded"` around your struct definition * or manually initialize the fields of your struct (`myStruct.x = 7;` etc). */ -AS_EXTERN NSUInteger ASHashBytes(void *bytes, size_t length); +ASDK_EXTERN NSUInteger ASHashBytes(void *bytes, size_t length); NS_ASSUME_NONNULL_END diff --git a/Source/Details/ASLayoutRangeType.h b/Source/Details/ASLayoutRangeType.h index 7361b206..1a60e29d 100644 --- a/Source/Details/ASLayoutRangeType.h +++ b/Source/Details/ASLayoutRangeType.h @@ -15,9 +15,9 @@ typedef struct { CGFloat trailingBufferScreenfuls; } ASRangeTuningParameters; -AS_EXTERN ASRangeTuningParameters const ASRangeTuningParametersZero; +ASDK_EXTERN ASRangeTuningParameters const ASRangeTuningParametersZero; -AS_EXTERN BOOL ASRangeTuningParametersEqualToRangeTuningParameters(ASRangeTuningParameters lhs, ASRangeTuningParameters rhs); +ASDK_EXTERN BOOL ASRangeTuningParametersEqualToRangeTuningParameters(ASRangeTuningParameters lhs, ASRangeTuningParameters rhs); /** * Each mode has a complete set of tuning parameters for range types. diff --git a/Source/Details/ASObjectDescriptionHelpers.h b/Source/Details/ASObjectDescriptionHelpers.h index 5a2823bd..beaf889a 100644 --- a/Source/Details/ASObjectDescriptionHelpers.h +++ b/Source/Details/ASObjectDescriptionHelpers.h @@ -44,13 +44,13 @@ NS_ASSUME_NONNULL_BEGIN - (NSMutableArray *)propertiesForDescription; @end -AS_EXTERN NSString *ASGetDescriptionValueString(id object); +ASDK_EXTERN NSString *ASGetDescriptionValueString(id object); /// Useful for structs etc. Returns e.g. { position = (0 0); frame = (0 0; 50 50) } -AS_EXTERN NSString *ASObjectDescriptionMakeWithoutObject(NSArray * _Nullable propertyGroups); +ASDK_EXTERN NSString *ASObjectDescriptionMakeWithoutObject(NSArray * _Nullable propertyGroups); /// Returns e.g. -AS_EXTERN NSString *ASObjectDescriptionMake(__autoreleasing id object, NSArray * _Nullable propertyGroups); +ASDK_EXTERN NSString *ASObjectDescriptionMake(__autoreleasing id object, NSArray * _Nullable propertyGroups); /** * Returns e.g. @@ -58,8 +58,8 @@ AS_EXTERN NSString *ASObjectDescriptionMake(__autoreleasing id object, NSArray element, ASPrimitiveTraitCollection traitCollection); +ASDK_EXTERN void ASTraitCollectionPropagateDown(id element, ASPrimitiveTraitCollection traitCollection); /** * Abstraction on top of UITraitCollection for propagation within AsyncDisplayKit-Layout @@ -105,7 +105,7 @@ AS_EXTERN void ASTraitCollectionPropagateDown(id element, ASPri * @abstract Sets a trait collection on this environment state. * * @discussion This only exists as an internal convenience method. Users should not override trait collection using it. - * Use [ASViewController overrideDisplayTraitsWithTraitCollection] block instead. + * Use [ASDKViewController overrideDisplayTraitsWithTraitCollection] block instead. */ - (void)setPrimitiveTraitCollection:(ASPrimitiveTraitCollection)traitCollection; diff --git a/Source/Details/ASTraitCollection.mm b/Source/Details/ASTraitCollection.mm index 8a697ecc..f26a2bea 100644 --- a/Source/Details/ASTraitCollection.mm +++ b/Source/Details/ASTraitCollection.mm @@ -86,7 +86,7 @@ ASPrimitiveTraitCollection ASPrimitiveTraitCollectionFromUITraitCollection(UITra return environmentTraitCollection; } -AS_EXTERN UITraitCollection * ASPrimitiveTraitCollectionToUITraitCollection(ASPrimitiveTraitCollection traitCollection) { +ASDK_EXTERN UITraitCollection * ASPrimitiveTraitCollectionToUITraitCollection(ASPrimitiveTraitCollection traitCollection) { NSMutableArray *collections = [[NSMutableArray alloc] initWithArray:@[ [UITraitCollection traitCollectionWithHorizontalSizeClass:traitCollection.horizontalSizeClass], [UITraitCollection traitCollectionWithVerticalSizeClass:traitCollection.verticalSizeClass], diff --git a/Source/Details/Transactions/_ASAsyncTransaction.h b/Source/Details/Transactions/_ASAsyncTransaction.h index 245c62b2..e3d0f211 100644 --- a/Source/Details/Transactions/_ASAsyncTransaction.h +++ b/Source/Details/Transactions/_ASAsyncTransaction.h @@ -32,7 +32,7 @@ typedef NS_ENUM(NSUInteger, ASAsyncTransactionState) { ASAsyncTransactionStateComplete }; -AS_EXTERN NSInteger const ASDefaultTransactionPriority; +ASDK_EXTERN NSInteger const ASDefaultTransactionPriority; /** @summary ASAsyncTransaction provides lightweight transaction semantics for asynchronous operations. diff --git a/Source/Details/Transactions/_ASAsyncTransaction.mm b/Source/Details/Transactions/_ASAsyncTransaction.mm index c23cad34..35d9a43c 100644 --- a/Source/Details/Transactions/_ASAsyncTransaction.mm +++ b/Source/Details/Transactions/_ASAsyncTransaction.mm @@ -19,7 +19,7 @@ #warning "Texture must be compiled with std=c++11 to prevent layout issues. gnu++ is not supported. This is hopefully temporary." #endif -AS_EXTERN NSRunLoopMode const UITrackingRunLoopMode; +ASDK_EXTERN NSRunLoopMode const UITrackingRunLoopMode; NSInteger const ASDefaultTransactionPriority = 0; diff --git a/Source/Details/_ASDisplayView.mm b/Source/Details/_ASDisplayView.mm index 12863e05..7741e444 100644 --- a/Source/Details/_ASDisplayView.mm +++ b/Source/Details/_ASDisplayView.mm @@ -15,7 +15,7 @@ #import #import #import -#import +#import #pragma mark - _ASDisplayView @@ -176,7 +176,7 @@ if (superview && node.viewControllerRoot) { UIViewController *vc = [node closestViewController]; - ASDisplayNodeAssert(vc != nil && [vc isKindOfClass:[ASViewController class]] && ((ASViewController*)vc).node == node, @"This node was once used as a view controller's node. You should not reuse it without its view controller."); + ASDisplayNodeAssert(vc != nil && [vc isKindOfClass:[ASDKViewController class]] && ((ASDKViewController*)vc).node == node, @"This node was once used as a view controller's node. You should not reuse it without its view controller."); } #endif diff --git a/Source/Layout/ASDimension.h b/Source/Layout/ASDimension.h index 0b3c6b7b..ab0717ba 100644 --- a/Source/Layout/ASDimension.h +++ b/Source/Layout/ASDimension.h @@ -83,7 +83,7 @@ typedef struct { /** * Represents auto as ASDimension */ -AS_EXTERN ASDimension const ASDimensionAuto; +ASDK_EXTERN ASDimension const ASDimensionAuto; /** * Returns a dimension with the specified type and value. @@ -116,7 +116,7 @@ ASOVERLOADABLE ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT ASDimension ASDimensio * Examples: ASDimensionMake(@"50%") = ASDimensionMake(ASDimensionUnitFraction, 0.5) * ASDimensionMake(@"0.5pt") = ASDimensionMake(ASDimensionUnitPoints, 0.5) */ -ASOVERLOADABLE AS_WARN_UNUSED_RESULT AS_EXTERN ASDimension ASDimensionMake(NSString *dimension); +ASOVERLOADABLE AS_WARN_UNUSED_RESULT ASDK_EXTERN ASDimension ASDimensionMake(NSString *dimension); /** * Returns a dimension with the specified points value. @@ -147,7 +147,7 @@ ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT BOOL ASDimensionEqualToDimension(ASDi /** * Returns a NSString representation of a dimension. */ -AS_EXTERN AS_WARN_UNUSED_RESULT NSString *NSStringFromASDimension(ASDimension dimension); +ASDK_EXTERN AS_WARN_UNUSED_RESULT NSString *NSStringFromASDimension(ASDimension dimension); /** * Resolve this dimension to a parent size. @@ -174,7 +174,7 @@ typedef struct { ASDimension height; } ASLayoutSize; -AS_EXTERN ASLayoutSize const ASLayoutSizeAuto; +ASDK_EXTERN ASLayoutSize const ASLayoutSizeAuto; /* * Creates an ASLayoutSize with provided min and max dimensions. @@ -219,12 +219,12 @@ typedef struct { /** * A size range with all dimensions zero. */ -AS_EXTERN ASSizeRange const ASSizeRangeZero; +ASDK_EXTERN ASSizeRange const ASSizeRangeZero; /** * A size range from zero to infinity in both directions. */ -AS_EXTERN ASSizeRange const ASSizeRangeUnconstrained; +ASDK_EXTERN ASSizeRange const ASSizeRangeUnconstrained; /** * Returns whether a size range has > 0.1 max width and max height. @@ -275,7 +275,7 @@ ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT CGSize ASSizeRangeClamp(ASSizeRange s * Intersects another size range. If the other size range does not overlap in either dimension, this size range * "wins" by returning a single point within its own range that is closest to the non-overlapping range. */ -AS_EXTERN AS_WARN_UNUSED_RESULT ASSizeRange ASSizeRangeIntersect(ASSizeRange sizeRange, ASSizeRange otherSizeRange); +ASDK_EXTERN AS_WARN_UNUSED_RESULT ASSizeRange ASSizeRangeIntersect(ASSizeRange sizeRange, ASSizeRange otherSizeRange); /** * Returns whether two size ranges are equal in min and max size. @@ -288,7 +288,7 @@ ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT BOOL ASSizeRangeEqualToSizeRange(ASSi /** * Returns a string representation of a size range */ -AS_EXTERN AS_WARN_UNUSED_RESULT NSString *NSStringFromASSizeRange(ASSizeRange sizeRange); +ASDK_EXTERN AS_WARN_UNUSED_RESULT NSString *NSStringFromASSizeRange(ASSizeRange sizeRange); #if YOGA @@ -306,9 +306,9 @@ typedef struct { ASDimension all; } ASEdgeInsets; -AS_EXTERN ASEdgeInsets const ASEdgeInsetsZero; +ASDK_EXTERN ASEdgeInsets const ASEdgeInsetsZero; -AS_EXTERN ASEdgeInsets ASEdgeInsetsMake(UIEdgeInsets edgeInsets); +ASDK_EXTERN ASEdgeInsets ASEdgeInsetsMake(UIEdgeInsets edgeInsets); #endif diff --git a/Source/Layout/ASDimensionInternal.h b/Source/Layout/ASDimensionInternal.h index df8f0560..dced2ffa 100644 --- a/Source/Layout/ASDimensionInternal.h +++ b/Source/Layout/ASDimensionInternal.h @@ -77,7 +77,7 @@ ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT BOOL ASLayoutElementSizeEqualToLayout /** * Returns a string formatted to contain the data from an ASLayoutElementSize. */ -AS_EXTERN AS_WARN_UNUSED_RESULT NSString *NSStringFromASLayoutElementSize(ASLayoutElementSize size); +ASDK_EXTERN AS_WARN_UNUSED_RESULT NSString *NSStringFromASLayoutElementSize(ASLayoutElementSize size); /** * Resolve the given size relative to a parent size and an auto size. @@ -86,7 +86,7 @@ AS_EXTERN AS_WARN_UNUSED_RESULT NSString *NSStringFromASLayoutElementSize(ASLayo * dimension with unit ASDimensionUnitAuto the given autoASSizeRange value will be used. * Based on the calculated exact, min and max size constraints the final size range will be calculated. */ -AS_EXTERN AS_WARN_UNUSED_RESULT ASSizeRange ASLayoutElementSizeResolveAutoSize(ASLayoutElementSize size, const CGSize parentSize, ASSizeRange autoASSizeRange); +ASDK_EXTERN AS_WARN_UNUSED_RESULT ASSizeRange ASLayoutElementSizeResolveAutoSize(ASLayoutElementSize size, const CGSize parentSize, ASSizeRange autoASSizeRange); /** * Resolve the given size to a parent size. Uses internally ASLayoutElementSizeResolveAutoSize with {INFINITY, INFINITY} as diff --git a/Source/Layout/ASLayout.h b/Source/Layout/ASLayout.h index 0e40574d..44b7de08 100644 --- a/Source/Layout/ASLayout.h +++ b/Source/Layout/ASLayout.h @@ -14,18 +14,18 @@ NS_ASSUME_NONNULL_BEGIN -AS_EXTERN CGPoint const ASPointNull; // {NAN, NAN} +ASDK_EXTERN CGPoint const ASPointNull; // {NAN, NAN} -AS_EXTERN BOOL ASPointIsNull(CGPoint point); +ASDK_EXTERN BOOL ASPointIsNull(CGPoint point); -AS_EXTERN NSString *const ASThreadDictMaxConstraintSizeKey; +ASDK_EXTERN NSString *const ASThreadDictMaxConstraintSizeKey; /** * Safely calculates the layout of the given root layoutElement by guarding against nil nodes. * @param rootLayoutElement The root node to calculate the layout for. * @param sizeRange The size range to calculate the root layout within. */ -AS_EXTERN ASLayout *ASCalculateRootLayout(id rootLayoutElement, const ASSizeRange sizeRange); +ASDK_EXTERN ASLayout *ASCalculateRootLayout(id rootLayoutElement, const ASSizeRange sizeRange); /** * Safely computes the layout of the given node by guarding against nil nodes. @@ -33,7 +33,7 @@ AS_EXTERN ASLayout *ASCalculateRootLayout(id rootLayoutElement, * @param sizeRange The size range to calculate the node layout within. * @param parentSize The parent size of the node to calculate the layout for. */ -AS_EXTERN ASLayout *ASCalculateLayout(idlayoutElement, const ASSizeRange sizeRange, const CGSize parentSize); +ASDK_EXTERN ASLayout *ASCalculateLayout(idlayoutElement, const ASSizeRange sizeRange, const CGSize parentSize); /** * A node in the layout tree that represents the size and position of the object that created it (ASLayoutElement). diff --git a/Source/Layout/ASLayoutElement.h b/Source/Layout/ASLayoutElement.h index df8deece..000f9655 100644 --- a/Source/Layout/ASLayoutElement.h +++ b/Source/Layout/ASLayoutElement.h @@ -25,10 +25,10 @@ NS_ASSUME_NONNULL_BEGIN /** A constant that indicates that the parent's size is not yet determined in a given dimension. */ -AS_EXTERN CGFloat const ASLayoutElementParentDimensionUndefined; +ASDK_EXTERN CGFloat const ASLayoutElementParentDimensionUndefined; /** A constant that indicates that the parent's size is not yet determined in either dimension. */ -AS_EXTERN CGSize const ASLayoutElementParentSizeUndefined; +ASDK_EXTERN CGSize const ASLayoutElementParentSizeUndefined; /** Type of ASLayoutElement */ typedef NS_ENUM(unsigned char, ASLayoutElementType) { @@ -144,24 +144,24 @@ typedef NS_ENUM(unsigned char, ASLayoutElementType) { #pragma mark - ASLayoutElementStyle -AS_EXTERN NSString * const ASLayoutElementStyleWidthProperty; -AS_EXTERN NSString * const ASLayoutElementStyleMinWidthProperty; -AS_EXTERN NSString * const ASLayoutElementStyleMaxWidthProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleWidthProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleMinWidthProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleMaxWidthProperty; -AS_EXTERN NSString * const ASLayoutElementStyleHeightProperty; -AS_EXTERN NSString * const ASLayoutElementStyleMinHeightProperty; -AS_EXTERN NSString * const ASLayoutElementStyleMaxHeightProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleHeightProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleMinHeightProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleMaxHeightProperty; -AS_EXTERN NSString * const ASLayoutElementStyleSpacingBeforeProperty; -AS_EXTERN NSString * const ASLayoutElementStyleSpacingAfterProperty; -AS_EXTERN NSString * const ASLayoutElementStyleFlexGrowProperty; -AS_EXTERN NSString * const ASLayoutElementStyleFlexShrinkProperty; -AS_EXTERN NSString * const ASLayoutElementStyleFlexBasisProperty; -AS_EXTERN NSString * const ASLayoutElementStyleAlignSelfProperty; -AS_EXTERN NSString * const ASLayoutElementStyleAscenderProperty; -AS_EXTERN NSString * const ASLayoutElementStyleDescenderProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleSpacingBeforeProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleSpacingAfterProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleFlexGrowProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleFlexShrinkProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleFlexBasisProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleAlignSelfProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleAscenderProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleDescenderProperty; -AS_EXTERN NSString * const ASLayoutElementStyleLayoutPositionProperty; +ASDK_EXTERN NSString * const ASLayoutElementStyleLayoutPositionProperty; @protocol ASLayoutElementStyleDelegate - (void)style:(__kindof ASLayoutElementStyle *)style propertyDidChange:(NSString *)propertyName; diff --git a/Source/Layout/ASLayoutElementPrivate.h b/Source/Layout/ASLayoutElementPrivate.h index cf699f42..bf8c05bf 100644 --- a/Source/Layout/ASLayoutElementPrivate.h +++ b/Source/Layout/ASLayoutElementPrivate.h @@ -22,16 +22,16 @@ AS_SUBCLASSING_RESTRICTED @property (nonatomic) int32_t transitionID; @end -AS_EXTERN int32_t const ASLayoutElementContextInvalidTransitionID; +ASDK_EXTERN int32_t const ASLayoutElementContextInvalidTransitionID; -AS_EXTERN int32_t const ASLayoutElementContextDefaultTransitionID; +ASDK_EXTERN int32_t const ASLayoutElementContextDefaultTransitionID; // Does not currently support nesting – there must be no current context. -AS_EXTERN void ASLayoutElementPushContext(ASLayoutElementContext * context); +ASDK_EXTERN void ASLayoutElementPushContext(ASLayoutElementContext * context); -AS_EXTERN ASLayoutElementContext * _Nullable ASLayoutElementGetCurrentContext(void); +ASDK_EXTERN ASLayoutElementContext * _Nullable ASLayoutElementGetCurrentContext(void); -AS_EXTERN void ASLayoutElementPopContext(void); +ASDK_EXTERN void ASLayoutElementPopContext(void); NS_ASSUME_NONNULL_END diff --git a/Source/Layout/ASYogaUtilities.h b/Source/Layout/ASYogaUtilities.h index c3d1d823..d5529fc4 100644 --- a/Source/Layout/ASYogaUtilities.h +++ b/Source/Layout/ASYogaUtilities.h @@ -27,22 +27,22 @@ @end // pre-order, depth-first -AS_EXTERN void ASDisplayNodePerformBlockOnEveryYogaChild(ASDisplayNode *node, void(^block)(ASDisplayNode *node)); +ASDK_EXTERN void ASDisplayNodePerformBlockOnEveryYogaChild(ASDisplayNode *node, void(^block)(ASDisplayNode *node)); #pragma mark - Yoga Type Conversion Helpers -AS_EXTERN YGAlign yogaAlignItems(ASStackLayoutAlignItems alignItems); -AS_EXTERN YGJustify yogaJustifyContent(ASStackLayoutJustifyContent justifyContent); -AS_EXTERN YGAlign yogaAlignSelf(ASStackLayoutAlignSelf alignSelf); -AS_EXTERN YGFlexDirection yogaFlexDirection(ASStackLayoutDirection direction); -AS_EXTERN float yogaFloatForCGFloat(CGFloat value); -AS_EXTERN float yogaDimensionToPoints(ASDimension dimension); -AS_EXTERN float yogaDimensionToPercent(ASDimension dimension); -AS_EXTERN ASDimension dimensionForEdgeWithEdgeInsets(YGEdge edge, ASEdgeInsets insets); +ASDK_EXTERN YGAlign yogaAlignItems(ASStackLayoutAlignItems alignItems); +ASDK_EXTERN YGJustify yogaJustifyContent(ASStackLayoutJustifyContent justifyContent); +ASDK_EXTERN YGAlign yogaAlignSelf(ASStackLayoutAlignSelf alignSelf); +ASDK_EXTERN YGFlexDirection yogaFlexDirection(ASStackLayoutDirection direction); +ASDK_EXTERN float yogaFloatForCGFloat(CGFloat value); +ASDK_EXTERN float yogaDimensionToPoints(ASDimension dimension); +ASDK_EXTERN float yogaDimensionToPercent(ASDimension dimension); +ASDK_EXTERN ASDimension dimensionForEdgeWithEdgeInsets(YGEdge edge, ASEdgeInsets insets); -AS_EXTERN void ASLayoutElementYogaUpdateMeasureFunc(YGNodeRef yogaNode, id layoutElement); -AS_EXTERN float ASLayoutElementYogaBaselineFunc(YGNodeRef yogaNode, const float width, const float height); -AS_EXTERN YGSize ASLayoutElementYogaMeasureFunc(YGNodeRef yogaNode, +ASDK_EXTERN void ASLayoutElementYogaUpdateMeasureFunc(YGNodeRef yogaNode, id layoutElement); +ASDK_EXTERN float ASLayoutElementYogaBaselineFunc(YGNodeRef yogaNode, const float width, const float height); +ASDK_EXTERN YGSize ASLayoutElementYogaMeasureFunc(YGNodeRef yogaNode, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode); diff --git a/Source/Private/ASBatchFetching.h b/Source/Private/ASBatchFetching.h index 15d5a98c..fec0c676 100644 --- a/Source/Private/ASBatchFetching.h +++ b/Source/Private/ASBatchFetching.h @@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN @param velocity The velocity of the scroll view (in points) at the moment the touch was released. @return Whether or not the current state should proceed with batch fetching. */ -AS_EXTERN BOOL ASDisplayShouldFetchBatchForScrollView(UIScrollView *scrollView, +ASDK_EXTERN BOOL ASDisplayShouldFetchBatchForScrollView(UIScrollView *scrollView, ASScrollDirection scrollDirection, ASScrollDirection scrollableDirections, CGPoint contentOffset, @@ -59,7 +59,7 @@ AS_EXTERN BOOL ASDisplayShouldFetchBatchForScrollView(UIScrollView +#import #import #if AS_ENABLE_TIPS diff --git a/Source/Private/ASTwoDimensionalArrayUtils.h b/Source/Private/ASTwoDimensionalArrayUtils.h index 6a3c9bb5..8bddf29e 100644 --- a/Source/Private/ASTwoDimensionalArrayUtils.h +++ b/Source/Private/ASTwoDimensionalArrayUtils.h @@ -21,26 +21,26 @@ NS_ASSUME_NONNULL_BEGIN * Deep mutable copy of an array that contains arrays, which contain objects. It will go one level deep into the array to copy. * This method is substantially faster than the generalized version, e.g. about 10x faster, so use it whenever it fits the need. */ -AS_EXTERN NSMutableArray *ASTwoDimensionalArrayDeepMutableCopy(NSArray *array) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN NSMutableArray *ASTwoDimensionalArrayDeepMutableCopy(NSArray *array) AS_WARN_UNUSED_RESULT; /** * Delete the elements of the mutable two-dimensional array at given index paths – sorted in descending order! */ -AS_EXTERN void ASDeleteElementsInTwoDimensionalArrayAtIndexPaths(NSMutableArray *mutableArray, NSArray *indexPaths); +ASDK_EXTERN void ASDeleteElementsInTwoDimensionalArrayAtIndexPaths(NSMutableArray *mutableArray, NSArray *indexPaths); /** * Return all the index paths of a two-dimensional array, in ascending order. */ -AS_EXTERN NSArray *ASIndexPathsForTwoDimensionalArray(NSArray* twoDimensionalArray) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN NSArray *ASIndexPathsForTwoDimensionalArray(NSArray* twoDimensionalArray) AS_WARN_UNUSED_RESULT; /** * Return all the elements of a two-dimensional array, in ascending order. */ -AS_EXTERN NSArray *ASElementsInTwoDimensionalArray(NSArray* twoDimensionalArray) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN NSArray *ASElementsInTwoDimensionalArray(NSArray* twoDimensionalArray) AS_WARN_UNUSED_RESULT; /** * Attempt to get the object at the given index path. Returns @c nil if the index path is out of bounds. */ -AS_EXTERN id _Nullable ASGetElementInTwoDimensionalArray(NSArray *array, NSIndexPath *indexPath) AS_WARN_UNUSED_RESULT; +ASDK_EXTERN id _Nullable ASGetElementInTwoDimensionalArray(NSArray *array, NSIndexPath *indexPath) AS_WARN_UNUSED_RESULT; NS_ASSUME_NONNULL_END diff --git a/Source/Private/Layout/ASStackUnpositionedLayout.h b/Source/Private/Layout/ASStackUnpositionedLayout.h index 989b4c2f..68f9421d 100644 --- a/Source/Private/Layout/ASStackUnpositionedLayout.h +++ b/Source/Private/Layout/ASStackUnpositionedLayout.h @@ -14,7 +14,7 @@ #import /** The threshold that determines if a violation has actually occurred. */ -AS_EXTERN CGFloat const kViolationEpsilon; +ASDK_EXTERN CGFloat const kViolationEpsilon; struct ASStackLayoutSpecChild { /** The original source child. */ diff --git a/Source/Private/TextExperiment/Component/ASTextLayout.h b/Source/Private/TextExperiment/Component/ASTextLayout.h index 46bc8ccf..55ac417f 100644 --- a/Source/Private/TextExperiment/Component/ASTextLayout.h +++ b/Source/Private/TextExperiment/Component/ASTextLayout.h @@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN /** The max text container size in layout. */ -AS_EXTERN const CGSize ASTextContainerMaxSize; +ASDK_EXTERN const CGSize ASTextContainerMaxSize; /** The ASTextContainer class defines a region in which text is laid out. diff --git a/Source/Private/TextExperiment/String/ASTextAttribute.h b/Source/Private/TextExperiment/String/ASTextAttribute.h index 2d9e3771..571334ed 100644 --- a/Source/Private/TextExperiment/String/ASTextAttribute.h +++ b/Source/Private/TextExperiment/String/ASTextAttribute.h @@ -23,7 +23,7 @@ typedef NS_OPTIONS(NSInteger, ASTextAttributeType) { }; /// Get the attribute type from an attribute name. -AS_EXTERN ASTextAttributeType ASTextAttributeGetType(NSString *attributeName); +ASDK_EXTERN ASTextAttributeType ASTextAttributeGetType(NSString *attributeName); /** Line style in ASText (similar to NSUnderlineStyle). diff --git a/Source/Private/_ASCoreAnimationExtras.h b/Source/Private/_ASCoreAnimationExtras.h index 5937f301..182bc353 100644 --- a/Source/Private/_ASCoreAnimationExtras.h +++ b/Source/Private/_ASCoreAnimationExtras.h @@ -34,21 +34,21 @@ @param obj ASDisplayNode, CALayer or object that conforms to `ASResizableContents` protocol @param image Image you would like to resize */ -AS_EXTERN void ASDisplayNodeSetResizableContents(id obj, UIImage *image); +ASDK_EXTERN void ASDisplayNodeSetResizableContents(id obj, UIImage *image); /** Turns a value of UIViewContentMode to a string for debugging or serialization @param contentMode Any of the UIViewContentMode constants @return A human-readable representation of the constant, or the integer value of the constant if not recognized. */ -AS_EXTERN NSString *ASDisplayNodeNSStringFromUIContentMode(UIViewContentMode contentMode); +ASDK_EXTERN NSString *ASDisplayNodeNSStringFromUIContentMode(UIViewContentMode contentMode); /** Turns a string representing a contentMode into a contentMode @param string Any of the strings in UIContentModeDescriptionLUT @return Any of the UIViewContentMode constants, or an int if the string is a number. If the string is not recognized, UIViewContentModeScaleToFill is returned. */ -AS_EXTERN UIViewContentMode ASDisplayNodeUIContentModeFromNSString(NSString *string); +ASDK_EXTERN UIViewContentMode ASDisplayNodeUIContentModeFromNSString(NSString *string); /** Maps a value of UIViewContentMode to a corresponding contentsGravity @@ -56,7 +56,7 @@ AS_EXTERN UIViewContentMode ASDisplayNodeUIContentModeFromNSString(NSString *str @param contentMode A content mode except for UIViewContentModeRedraw, which has no corresponding contentsGravity (it corresponds to needsDisplayOnBoundsChange = YES) @return An NSString constant from the documentation, eg kCAGravityCenter... or nil if there is no corresponding contentsGravity. Will assert if contentMode is unknown. */ -AS_EXTERN NSString *const ASDisplayNodeCAContentsGravityFromUIContentMode(UIViewContentMode contentMode); +ASDK_EXTERN NSString *const ASDisplayNodeCAContentsGravityFromUIContentMode(UIViewContentMode contentMode); /** Maps a value of contentsGravity to a corresponding UIViewContentMode @@ -64,21 +64,21 @@ AS_EXTERN NSString *const ASDisplayNodeCAContentsGravityFromUIContentMode(UIView @param contentsGravity A contents gravity @return A UIViewContentMode constant from UIView.h, eg UIViewContentModeCenter..., or UIViewContentModeScaleToFill if contentsGravity is not one of the CA constants. Will assert if the contentsGravity is unknown. */ -AS_EXTERN UIViewContentMode ASDisplayNodeUIContentModeFromCAContentsGravity(NSString *const contentsGravity); +ASDK_EXTERN UIViewContentMode ASDisplayNodeUIContentModeFromCAContentsGravity(NSString *const contentsGravity); /** Use this to create a stretchable appropriate to approximate a filled rectangle, but with antialiasing on the edges when not pixel-aligned. It's best to keep the layer this image is added to with contentsScale equal to the scale of the final transform to screen space so it is able to antialias appropriately even when you shrink or grow the layer. @param color the fill color to use in the center of the image @param innerSize Unfortunately, 4 seems to be the smallest inner size that works if you're applying this stretchable to a larger box, whereas it does not display correctly for larger boxes. Thus some adjustment is necessary for the size of box you're displaying. If you're showing a 1px horizontal line, pass 1 height and at least 4 width. 2px vertical line: 2px wide, 4px high. Passing an innerSize greater that you desire is wasteful */ -AS_EXTERN UIImage *ASDisplayNodeStretchableBoxContentsWithColor(UIColor *color, CGSize innerSize); +ASDK_EXTERN UIImage *ASDisplayNodeStretchableBoxContentsWithColor(UIColor *color, CGSize innerSize); /** Checks whether a layer has ongoing animations @param layer A layer to check if animations are ongoing @return YES if the layer has ongoing animations, otherwise NO */ -AS_EXTERN BOOL ASDisplayNodeLayerHasAnimations(CALayer *layer); +ASDK_EXTERN BOOL ASDisplayNodeLayerHasAnimations(CALayer *layer); // This function is a less generalized version of ASDisplayNodeSetResizableContents. -AS_EXTERN void ASDisplayNodeSetupLayerContentsWithResizableImage(CALayer *layer, UIImage *image) ASDISPLAYNODE_DEPRECATED; +ASDK_EXTERN void ASDisplayNodeSetupLayerContentsWithResizableImage(CALayer *layer, UIImage *image) ASDISPLAYNODE_DEPRECATED; diff --git a/Source/TextKit/ASTextKitAttributes.h b/Source/TextKit/ASTextKitAttributes.h index bf9017a5..cf09ad66 100644 --- a/Source/TextKit/ASTextKitAttributes.h +++ b/Source/TextKit/ASTextKitAttributes.h @@ -17,12 +17,12 @@ #import -AS_EXTERN NSString *const ASTextKitTruncationAttributeName; +ASDK_EXTERN NSString *const ASTextKitTruncationAttributeName; /** Use ASTextKitEntityAttribute as the value of this attribute to embed a link or other interactable content inside the text. */ -AS_EXTERN NSString *const ASTextKitEntityAttributeName; +ASDK_EXTERN NSString *const ASTextKitEntityAttributeName; /** All NSObject values in this struct should be copied when passed into the TextComponent. diff --git a/Source/TextKit/ASTextKitCoreTextAdditions.h b/Source/TextKit/ASTextKitCoreTextAdditions.h index 9a8f4805..0da484d0 100644 --- a/Source/TextKit/ASTextKitCoreTextAdditions.h +++ b/Source/TextKit/ASTextKitCoreTextAdditions.h @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN - kCTUnderlineColorAttributeName @result Whether attributeName is an unsupported Core Text attribute. */ -AS_EXTERN BOOL ASAttributeWithNameIsUnsupportedCoreTextAttribute(NSString *attributeName); +ASDK_EXTERN BOOL ASAttributeWithNameIsUnsupportedCoreTextAttribute(NSString *attributeName); /** @@ -54,14 +54,14 @@ AS_EXTERN BOOL ASAttributeWithNameIsUnsupportedCoreTextAttribute(NSString *attri - kCTUnderlineColorAttributeName @result An NSDictionary of attributes for use by NSAttributedString. */ -AS_EXTERN NSDictionary *NSAttributedStringAttributesForCoreTextAttributes(NSDictionary *coreTextAttributes); +ASDK_EXTERN NSDictionary *NSAttributedStringAttributesForCoreTextAttributes(NSDictionary *coreTextAttributes); /** @abstract Returns an NSAttributedString whose Core Text attributes have been converted, where possible, to NSAttributedString attributes. @param dirtyAttributedString An NSAttributedString that may contain Core Text attributes. @result An NSAttributedString that's preserved as many CFAttributedString attributes as possible. */ -AS_EXTERN NSAttributedString *ASCleanseAttributedStringOfCoreTextAttributes(NSAttributedString *dirtyAttributedString); +ASDK_EXTERN NSAttributedString *ASCleanseAttributedStringOfCoreTextAttributes(NSAttributedString *dirtyAttributedString); #pragma mark - #pragma mark - diff --git a/Tests/ASViewControllerTests.mm b/Tests/ASDKViewControllerTests.mm similarity index 93% rename from Tests/ASViewControllerTests.mm rename to Tests/ASDKViewControllerTests.mm index 929ee67b..1f7af48c 100644 --- a/Tests/ASViewControllerTests.mm +++ b/Tests/ASDKViewControllerTests.mm @@ -1,5 +1,5 @@ // -// ASViewControllerTests.mm +// ASDKViewControllerTests.mm // Texture // // Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. @@ -15,11 +15,11 @@ #import "NSInvocation+ASTestHelpers.h" -@interface ASViewControllerTests : XCTestCase +@interface ASDKViewControllerTests : XCTestCase @end -@implementation ASViewControllerTests +@implementation ASDKViewControllerTests - (void)testThatAutomaticSubnodeManagementScrollViewInsetsAreApplied { @@ -32,7 +32,7 @@ node.layoutSpecBlock = ^(ASDisplayNode *node, ASSizeRange constrainedSize){ return [ASInsetLayoutSpec insetLayoutSpecWithInsets:UIEdgeInsetsZero child:scrollNode]; }; - ASViewController *vc = [[ASViewController alloc] initWithNode:node]; + ASDKViewController *vc = [[ASDKViewController alloc] initWithNode:node]; window.rootViewController = [[UINavigationController alloc] initWithRootViewController:vc]; [window makeKeyAndVisible]; [window layoutIfNeeded]; @@ -48,7 +48,7 @@ ASDisplayNode *node = [[ASDisplayNode alloc] init]; - ASViewController *vc = [[ASViewController alloc] initWithNode:node]; + ASDKViewController *vc = [[ASDKViewController alloc] initWithNode:node]; vc.node.backgroundColor = [UIColor greenColor]; vc.edgesForExtendedLayout = UIRectEdgeNone; diff --git a/Tests/ASDisplayNodeTests.mm b/Tests/ASDisplayNodeTests.mm index e6ef1be3..edf622c7 100644 --- a/Tests/ASDisplayNodeTests.mm +++ b/Tests/ASDisplayNodeTests.mm @@ -29,7 +29,7 @@ #import #import #import -#import +#import #import "ASXCTExtensions.h" #import "ASDisplayNodeTestsHelper.h" @@ -274,7 +274,7 @@ for (ASDisplayNode *n in @[ nodes ]) {\ } @end -@interface ASTestViewController: ASViewController +@interface ASTestViewController: ASDKViewController @end @implementation ASTestViewController - (BOOL)prefersStatusBarHidden { return YES; } diff --git a/Tests/ASDisplayNodeTestsHelper.h b/Tests/ASDisplayNodeTestsHelper.h index 4e884f44..07c8d617 100644 --- a/Tests/ASDisplayNodeTestsHelper.h +++ b/Tests/ASDisplayNodeTestsHelper.h @@ -14,8 +14,8 @@ typedef BOOL (^as_condition_block_t)(void); -AS_EXTERN BOOL ASDisplayNodeRunRunLoopUntilBlockIsTrue(as_condition_block_t block); +ASDK_EXTERN BOOL ASDisplayNodeRunRunLoopUntilBlockIsTrue(as_condition_block_t block); -AS_EXTERN void ASDisplayNodeSizeToFitSize(ASDisplayNode *node, CGSize size); -AS_EXTERN void ASDisplayNodeSizeToFitSizeRange(ASDisplayNode *node, ASSizeRange sizeRange); -AS_EXTERN void ASCATransactionQueueWait(ASCATransactionQueue *q); // nil means shared queue +ASDK_EXTERN void ASDisplayNodeSizeToFitSize(ASDisplayNode *node, CGSize size); +ASDK_EXTERN void ASDisplayNodeSizeToFitSizeRange(ASDisplayNode *node, ASSizeRange sizeRange); +ASDK_EXTERN void ASCATransactionQueueWait(ASCATransactionQueue *q); // nil means shared queue diff --git a/Tests/ASDisplayViewAccessibilityTests.mm b/Tests/ASDisplayViewAccessibilityTests.mm index f1a7696c..2b8a848b 100644 --- a/Tests/ASDisplayViewAccessibilityTests.mm +++ b/Tests/ASDisplayViewAccessibilityTests.mm @@ -21,7 +21,7 @@ #import #import #import -#import +#import #import #import "ASDisplayNodeTestsHelper.h" @@ -339,7 +339,7 @@ extern void SortAccessibilityElements(NSMutableArray *elements); ASDisplayNode *node = [[ASDisplayNode alloc] init]; node.automaticallyManagesSubnodes = YES; - ASViewController *vc = [[ASViewController alloc] initWithNode:node]; + ASDKViewController *vc = [[ASDKViewController alloc] initWithNode:node]; window.rootViewController = vc; [window makeKeyAndVisible]; [window layoutIfNeeded]; @@ -389,7 +389,7 @@ extern void SortAccessibilityElements(NSMutableArray *elements); ASScrollNode *node = [[ASScrollNode alloc] init]; node.automaticallyManagesSubnodes = YES; - ASViewController *vc = [[ASViewController alloc] initWithNode:node]; + ASDKViewController *vc = [[ASDKViewController alloc] initWithNode:node]; window.rootViewController = vc; [window makeKeyAndVisible]; [window layoutIfNeeded]; @@ -494,7 +494,7 @@ extern void SortAccessibilityElements(NSMutableArray *elements); ASDisplayNode *node = [[ASDisplayNode alloc] init]; node.automaticallyManagesSubnodes = YES; - ASViewController *vc = [[ASViewController alloc] initWithNode:node]; + ASDKViewController *vc = [[ASDKViewController alloc] initWithNode:node]; window.rootViewController = vc; [window makeKeyAndVisible]; [window layoutIfNeeded]; @@ -535,7 +535,7 @@ extern void SortAccessibilityElements(NSMutableArray *elements); ASDisplayNode *node = [[ASDisplayNode alloc] init]; node.automaticallyManagesSubnodes = YES; - ASViewController *vc = [[ASViewController alloc] initWithNode:node]; + ASDKViewController *vc = [[ASDKViewController alloc] initWithNode:node]; window.rootViewController = vc; [window makeKeyAndVisible]; [window layoutIfNeeded]; @@ -597,7 +597,7 @@ extern void SortAccessibilityElements(NSMutableArray *elements); ASDisplayNode *node = [[ASDisplayNode alloc] init]; node.automaticallyManagesSubnodes = YES; - ASViewController *vc = [[ASViewController alloc] initWithNode:node]; + ASDKViewController *vc = [[ASDKViewController alloc] initWithNode:node]; window.rootViewController = vc; [window makeKeyAndVisible]; [window layoutIfNeeded]; diff --git a/Tests/ASNavigationControllerTests.mm b/Tests/ASNavigationControllerTests.mm index d9ed2464..379905a4 100644 --- a/Tests/ASNavigationControllerTests.mm +++ b/Tests/ASNavigationControllerTests.mm @@ -16,8 +16,8 @@ @implementation ASNavigationControllerTests - (void)testSetViewControllers { - ASViewController *firstController = [ASViewController new]; - ASViewController *secondController = [ASViewController new]; + ASDKViewController *firstController = [ASDKViewController new]; + ASDKViewController *secondController = [ASDKViewController new]; NSArray *expectedViewControllerStack = @[firstController, secondController]; ASNavigationController *navigationController = [ASNavigationController new]; [navigationController setViewControllers:@[firstController, secondController]]; @@ -27,8 +27,8 @@ } - (void)testPopViewController { - ASViewController *firstController = [ASViewController new]; - ASViewController *secondController = [ASViewController new]; + ASDKViewController *firstController = [ASDKViewController new]; + ASDKViewController *secondController = [ASDKViewController new]; NSArray *expectedViewControllerStack = @[firstController]; ASNavigationController *navigationController = [ASNavigationController new]; [navigationController setViewControllers:@[firstController, secondController]]; @@ -39,8 +39,8 @@ } - (void)testPushViewController { - ASViewController *firstController = [ASViewController new]; - ASViewController *secondController = [ASViewController new]; + ASDKViewController *firstController = [ASDKViewController new]; + ASDKViewController *secondController = [ASDKViewController new]; NSArray *expectedViewControllerStack = @[firstController, secondController]; ASNavigationController *navigationController = [[ASNavigationController new] initWithRootViewController:firstController]; [navigationController pushViewController:secondController animated:false]; diff --git a/Tests/ASPagerNodeTests.mm b/Tests/ASPagerNodeTests.mm index 416efaae..835de4d4 100644 --- a/Tests/ASPagerNodeTests.mm +++ b/Tests/ASPagerNodeTests.mm @@ -122,7 +122,7 @@ node.layoutSpecBlock = ^(ASDisplayNode *node, ASSizeRange constrainedSize){ return [ASInsetLayoutSpec insetLayoutSpecWithInsets:UIEdgeInsetsZero child:pagerNode]; }; - ASViewController *vc = [[ASViewController alloc] initWithNode:node]; + ASDKViewController *vc = [[ASDKViewController alloc] initWithNode:node]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc]; window.rootViewController = nav; [window makeKeyAndVisible]; diff --git a/Tests/ASTabBarControllerTests.mm b/Tests/ASTabBarControllerTests.mm index 764ab9b5..b20c7a98 100644 --- a/Tests/ASTabBarControllerTests.mm +++ b/Tests/ASTabBarControllerTests.mm @@ -8,7 +8,7 @@ #import #import -#import +#import @interface ASTabBarControllerTests: XCTestCase @@ -17,8 +17,8 @@ @implementation ASTabBarControllerTests - (void)testTabBarControllerSelectIndex { - ASViewController *firstViewController = [ASViewController new]; - ASViewController *secondViewController = [ASViewController new]; + ASDKViewController *firstViewController = [ASDKViewController new]; + ASDKViewController *secondViewController = [ASDKViewController new]; NSArray *viewControllers = @[firstViewController, secondViewController]; ASTabBarController *tabBarController = [ASTabBarController new]; [tabBarController setViewControllers:viewControllers]; @@ -28,8 +28,8 @@ } - (void)testTabBarControllerSelectViewController { - ASViewController *firstViewController = [ASViewController new]; - ASViewController *secondViewController = [ASViewController new]; + ASDKViewController *firstViewController = [ASDKViewController new]; + ASDKViewController *secondViewController = [ASDKViewController new]; NSArray *viewControllers = @[firstViewController, secondViewController]; ASTabBarController *tabBarController = [ASTabBarController new]; [tabBarController setViewControllers:viewControllers]; diff --git a/Tests/ASTableViewTests.mm b/Tests/ASTableViewTests.mm index 29bb72c8..0d07d129 100644 --- a/Tests/ASTableViewTests.mm +++ b/Tests/ASTableViewTests.mm @@ -776,7 +776,7 @@ ASTableViewFilledDataSource *ds = [[ASTableViewFilledDataSource alloc] init]; ds.rowsPerSection = 1; node.dataSource = ds; - ASViewController *vc = [[ASViewController alloc] initWithNode:node]; + ASDKViewController *vc = [[ASDKViewController alloc] initWithNode:node]; UITabBarController *tabCtrl = [[UITabBarController alloc] init]; tabCtrl.viewControllers = @[ vc ]; tabCtrl.tabBar.translucent = NO; diff --git a/ThreeMigrationGuide.md b/ThreeMigrationGuide.md index eafc3e57..4ea5bf37 100644 --- a/ThreeMigrationGuide.md +++ b/ThreeMigrationGuide.md @@ -2,6 +2,7 @@ Got a tip for upgrading? Please open a PR to this document! +- Rename all instances of ASViewController to ASDKViewController ### Breaking API Changes diff --git a/docs/_docs/asviewcontroller.md b/docs/_docs/asdkviewcontroller.md similarity index 73% rename from docs/_docs/asviewcontroller.md rename to docs/_docs/asdkviewcontroller.md index 9cba5be9..09cca245 100755 --- a/docs/_docs/asviewcontroller.md +++ b/docs/_docs/asdkviewcontroller.md @@ -1,16 +1,16 @@ --- -title: ASViewController +title: ASDKViewController layout: docs -permalink: /docs/asviewcontroller.html +permalink: /docs/ASDKViewController.html prevPage: nextPage: aspagernode.html --- -`ASViewController` is a direct subclass of `UIViewController`. For the most part, it can be used in place of any `UIViewController` relatively easily. +`ASDKViewController` is a direct subclass of `UIViewController`. For the most part, it can be used in place of any `UIViewController` relatively easily. The main difference is that you construct and return the node you'd like managed as opposed to the way `UIViewController` provides a view of its own. -Consider the following `ASViewController` subclass that would like to use a custom table node as its managed node. +Consider the following `ASDKViewController` subclass that would like to use a custom table node as its managed node.
SwiftObjective-C @@ -52,4 +52,4 @@ The most important line is: `if (!(self = [super initWithNode:tableNode])) { return nil; }` -As you can see, `ASViewController`'s are initialized with a node of your choosing. +As you can see, `ASDKViewController`'s are initialized with a node of your choosing. diff --git a/docs/_docs/development/layout-specs.md b/docs/_docs/development/layout-specs.md index 771d4ca0..9fec1169 100644 --- a/docs/_docs/development/layout-specs.md +++ b/docs/_docs/development/layout-specs.md @@ -71,7 +71,7 @@ This is the function that will recursively call through its underlying tree of n ![layoutcallstack1](/static/images/development/layoutspecs1.png) -This is what a typical call stack will look like for the layout of an `ASViewController` with a simple view hierarchy. Here we clicked on the "Photo with outset icon overlay" in the Layout Specs Examples project. Breakpointing on the `-[PhotoWithOutsetIconOverlay layoutSpecThatFits:]` reveals that call stack. +This is what a typical call stack will look like for the layout of an `ASDKViewController` with a simple view hierarchy. Here we clicked on the "Photo with outset icon overlay" in the Layout Specs Examples project. Breakpointing on the `-[PhotoWithOutsetIconOverlay layoutSpecThatFits:]` reveals that call stack. The first significant branch of logic is the top level `-[ASDisplayNode calculateLayoutThatFits]` where it will choose between the Texture Layout and the Yoga engine. diff --git a/docs/_docs/development/node-lifecycle.md b/docs/_docs/development/node-lifecycle.md index dabb0757..6484eeed 100644 --- a/docs/_docs/development/node-lifecycle.md +++ b/docs/_docs/development/node-lifecycle.md @@ -39,7 +39,7 @@ As mentioned above, ASDeallocQueue helps to defer the deallocation of objects gi # Nodes that are not managed by containers -These are nodes that are often directly created by client code, such as direct and indirect subnodes of cell nodes. When a node is added to a parent node, the parent node retains it until it's removed from the parent node, or until the parent node is deallocated. As a result, if the subnode is not retained by client code in any other way or if it's not removed from the parent node, the subnode's lifecycle is tied to the parent node's lifecycle. In addition, since nodes often live in a hierarchy, the entire node hierarchy has the same lifecycle as the root node's. Lastly, if the root node is managed by a node container -- directly in the case of ASViewController and the like, or indirectly as a cell node of a collection or table node --, then the entire node hierarchy is managed by the node container. +These are nodes that are often directly created by client code, such as direct and indirect subnodes of cell nodes. When a node is added to a parent node, the parent node retains it until it's removed from the parent node, or until the parent node is deallocated. As a result, if the subnode is not retained by client code in any other way or if it's not removed from the parent node, the subnode's lifecycle is tied to the parent node's lifecycle. In addition, since nodes often live in a hierarchy, the entire node hierarchy has the same lifecycle as the root node's. Lastly, if the root node is managed by a node container -- directly in the case of ASDKViewController and the like, or indirectly as a cell node of a collection or table node --, then the entire node hierarchy is managed by the node container. ## Node lifecycle under [Automatic Subnode Management (ASM)](/docs/automatic-subnode-mgmt.html) diff --git a/docs/_docs/subclassing.md b/docs/_docs/subclassing.md index 0bedc55a..57af53f8 100755 --- a/docs/_docs/subclassing.md +++ b/docs/_docs/subclassing.md @@ -5,7 +5,7 @@ permalink: /docs/subclassing.html prevPage: node-overview.html nextPage: faq.html --- -The most important distinction when creating a subclass is whether you writing an ASViewController or an ASDisplayNode. This sounds obvious, but because some of these differences are subtle, it is important to keep this top of mind. +The most important distinction when creating a subclass is whether you writing an ASDKViewController or an ASDisplayNode. This sounds obvious, but because some of these differences are subtle, it is important to keep this top of mind. ## ASDisplayNode
@@ -43,17 +43,17 @@ One great use of `-layout` is for the specific case in which you want a subnode subnode.frame = self.bounds; ``` -If you desire the same effect in a ASViewController, you can do the same thing in -viewWillLayoutSubviews, unless your node is the node in initWithNode: and in that case it will do this automatically. +If you desire the same effect in a ASDKViewController, you can do the same thing in -viewWillLayoutSubviews, unless your node is the node in initWithNode: and in that case it will do this automatically. -## ASViewController +## ASDKViewController
-An `ASViewController` is a regular `UIViewController` subclass that has special features to manage nodes. Since it is a UIViewController subclass, all methods are called on the **main thread** (and you should always create an ASViewController on the main thread). +An `ASDKViewController` is a regular `UIViewController` subclass that has special features to manage nodes. Since it is a UIViewController subclass, all methods are called on the **main thread** (and you should always create an ASDKViewController on the main thread). ### `-init` -This method is called once, at the very beginning of an ASViewController's lifecycle. As with UIViewController initialization, it is best practice to **never access** `self.view` or `self.node.view` in this method as it will force the view to be created early. Instead, do any view access in -viewDidLoad. +This method is called once, at the very beginning of an ASDKViewController's lifecycle. As with UIViewController initialization, it is best practice to **never access** `self.view` or `self.node.view` in this method as it will force the view to be created early. Instead, do any view access in -viewDidLoad. -ASViewController's designated initializer is `initWithNode:`. A typical initializer will look something like the code below. Note how the ASViewController's node is created _before_ calling super. An ASViewController manages a node similarly to how a UIViewController manages a view, but the initialization is slightly different. +ASDKViewController's designated initializer is `initWithNode:`. A typical initializer will look something like the code below. Note how the ASDKViewController's node is created _before_ calling super. An ASDKViewController manages a node similarly to how a UIViewController manages a view, but the initialization is slightly different.
@@ -93,18 +93,18 @@ We recommend that you do not use this method because it is has no particular adv ### `-viewDidLoad` -This method is called once in a ASViewController's lifecycle, immediately after `-loadView`. This is the earliest time at which you should access the node's view. It is a great spot to put any **setup code that should only be run once and requires access to the view/layer**, such as adding a gesture recognizer. +This method is called once in a ASDKViewController's lifecycle, immediately after `-loadView`. This is the earliest time at which you should access the node's view. It is a great spot to put any **setup code that should only be run once and requires access to the view/layer**, such as adding a gesture recognizer. Layout code should never be put in this method, because it will not be called again when geometry changes. Note this is equally true for UIViewController; it is bad practice to put layout code in this method even if you don't currently expect geometry changes. ### `-viewWillLayoutSubviews` -This method is called at the exact same time as a node's `-layout` method and it may be called multiple times in a ASViewController's lifecycle; it will be called whenever the bounds of the ASViewController's node are changed (including rotation, split screen, keyboard presentation) as well as when there are changes to the hierarchy (children being added, removed, or changed in size). +This method is called at the exact same time as a node's `-layout` method and it may be called multiple times in a ASDKViewController's lifecycle; it will be called whenever the bounds of the ASDKViewController's node are changed (including rotation, split screen, keyboard presentation) as well as when there are changes to the hierarchy (children being added, removed, or changed in size). For consistency, it is best practice to put all layout code in this method. Because it is not called very frequently, even code that does not directly depend on the size belongs here. ### `-viewWillAppear:` / `-viewDidDisappear:` -These methods are called just before the ASViewController's node appears on screen (the earliest time that it is visible) and just after it is removed from the view hierarchy (the earliest time that it is no longer visible). These methods provide a good opportunity to start or stop animations related to the presentation or dismissal of your controller. This is also a good place to make a log of a user action. +These methods are called just before the ASDKViewController's node appears on screen (the earliest time that it is visible) and just after it is removed from the view hierarchy (the earliest time that it is no longer visible). These methods provide a good opportunity to start or stop animations related to the presentation or dismissal of your controller. This is also a good place to make a log of a user action. Although these methods may be called multiple times and geometry information is available, they are not called for all geometry changes and so should not be used for core layout code (beyond setup required for specific animations). diff --git a/docs/_docs/synchronous-concurrency.md b/docs/_docs/synchronous-concurrency.md index d4430b75..158407ec 100755 --- a/docs/_docs/synchronous-concurrency.md +++ b/docs/_docs/synchronous-concurrency.md @@ -6,7 +6,7 @@ prevPage: subtree-rasterization.html nextPage: corner-rounding.html --- -Both `ASViewController` and `ASCellNode` have a property called `neverShowPlaceholders`. +Both `ASDKViewController` and `ASCellNode` have a property called `neverShowPlaceholders`. By setting this property to YES, the main thread will be blocked until display has completed for the cell or view controller's view. @@ -27,6 +27,6 @@ node.neverShowPlaceholders = true

-Usually, if a cell hasn't finished its display pass before it has reached the screen it will show placeholders until it has drawing its content. Setting this option to YES makes your scrolling node or ASViewController act more like UIKit, and in fact makes Texture scrolling visually indistinguishable from UIKit's, except that it's faster. +Usually, if a cell hasn't finished its display pass before it has reached the screen it will show placeholders until it has drawing its content. Setting this option to YES makes your scrolling node or ASDKViewController act more like UIKit, and in fact makes Texture scrolling visually indistinguishable from UIKit's, except that it's faster. diff --git a/examples/ASDKTube/Sample/Controller/VideoFeedNodeController.h b/examples/ASDKTube/Sample/Controller/VideoFeedNodeController.h index 131bb38e..f6100ac9 100644 --- a/examples/ASDKTube/Sample/Controller/VideoFeedNodeController.h +++ b/examples/ASDKTube/Sample/Controller/VideoFeedNodeController.h @@ -9,6 +9,6 @@ #import -@interface VideoFeedNodeController : ASViewController +@interface VideoFeedNodeController : ASDKViewController @end diff --git a/examples/ASDKTube/Sample/ViewController.h b/examples/ASDKTube/Sample/ViewController.h index 560b6a2d..8e8bc18b 100644 --- a/examples/ASDKTube/Sample/ViewController.h +++ b/examples/ASDKTube/Sample/ViewController.h @@ -9,6 +9,6 @@ #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/ASDKgram/Sample/PhotoFeedBaseController.h b/examples/ASDKgram/Sample/PhotoFeedBaseController.h index b40a5946..82aea4d4 100644 --- a/examples/ASDKgram/Sample/PhotoFeedBaseController.h +++ b/examples/ASDKgram/Sample/PhotoFeedBaseController.h @@ -13,7 +13,7 @@ @protocol PhotoFeedControllerProtocol; @class PhotoFeedModel; -@interface PhotoFeedBaseController : ASViewController +@interface PhotoFeedBaseController : ASDKViewController @property (nonatomic, strong, readonly) PhotoFeedModel *photoFeed; @property (nonatomic, strong, readonly) UITableView *tableView; diff --git a/examples/ASDKgram/Sample/PhotoFeedListKitViewController.h b/examples/ASDKgram/Sample/PhotoFeedListKitViewController.h index a1e3e6a3..b84f3621 100644 --- a/examples/ASDKgram/Sample/PhotoFeedListKitViewController.h +++ b/examples/ASDKgram/Sample/PhotoFeedListKitViewController.h @@ -9,6 +9,6 @@ #import #import "PhotoFeedControllerProtocol.h" -@interface PhotoFeedListKitViewController : ASViewController +@interface PhotoFeedListKitViewController : ASDKViewController @end diff --git a/examples/ASMapNode/Sample/ViewController.h b/examples/ASMapNode/Sample/ViewController.h index 7054e2d8..c5228722 100644 --- a/examples/ASMapNode/Sample/ViewController.h +++ b/examples/ASMapNode/Sample/ViewController.h @@ -7,9 +7,9 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // -#import +#import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/ASViewController/Sample/DetailViewController.h b/examples/ASViewController/Sample/DetailViewController.h index 0c5eb858..cc78cf17 100644 --- a/examples/ASViewController/Sample/DetailViewController.h +++ b/examples/ASViewController/Sample/DetailViewController.h @@ -7,9 +7,9 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // -#import +#import #import "DetailRootNode.h" -@interface DetailViewController : ASViewController +@interface DetailViewController : ASDKViewController @end diff --git a/examples/ASViewController/Sample/ViewController.h b/examples/ASViewController/Sample/ViewController.h index f1700621..70421044 100644 --- a/examples/ASViewController/Sample/ViewController.h +++ b/examples/ASViewController/Sample/ViewController.h @@ -7,10 +7,10 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // -#import +#import #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/AsyncDisplayKitOverview/Sample/OverviewComponentsViewController.h b/examples/AsyncDisplayKitOverview/Sample/OverviewComponentsViewController.h index cae34ad2..c439021d 100644 --- a/examples/AsyncDisplayKitOverview/Sample/OverviewComponentsViewController.h +++ b/examples/AsyncDisplayKitOverview/Sample/OverviewComponentsViewController.h @@ -17,7 +17,7 @@ @end -@interface OverviewComponentsViewController : ASViewController +@interface OverviewComponentsViewController : ASDKViewController @end diff --git a/examples/CatDealsCollectionView/Sample/ViewController.h b/examples/CatDealsCollectionView/Sample/ViewController.h index 560b6a2d..8e8bc18b 100644 --- a/examples/CatDealsCollectionView/Sample/ViewController.h +++ b/examples/CatDealsCollectionView/Sample/ViewController.h @@ -9,6 +9,6 @@ #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/CustomCollectionView-Swift/Sample/ViewController.swift b/examples/CustomCollectionView-Swift/Sample/ViewController.swift index 1e33a06f..3625b4c6 100644 --- a/examples/CustomCollectionView-Swift/Sample/ViewController.swift +++ b/examples/CustomCollectionView-Swift/Sample/ViewController.swift @@ -10,7 +10,7 @@ import UIKit import AsyncDisplayKit -class ViewController: ASViewController, MosaicCollectionViewLayoutDelegate, ASCollectionDataSource, ASCollectionDelegate { +class ViewController: ASDKViewController, MosaicCollectionViewLayoutDelegate, ASCollectionDataSource, ASCollectionDelegate { var _sections = [[UIImage]]() let _collectionNode: ASCollectionNode diff --git a/examples/CustomCollectionView/Sample/ViewController.h b/examples/CustomCollectionView/Sample/ViewController.h index da850f74..b9629ecd 100644 --- a/examples/CustomCollectionView/Sample/ViewController.h +++ b/examples/CustomCollectionView/Sample/ViewController.h @@ -10,6 +10,6 @@ #import #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/HorizontalWithinVerticalScrolling/Sample/ViewController.h b/examples/HorizontalWithinVerticalScrolling/Sample/ViewController.h index 560b6a2d..8e8bc18b 100644 --- a/examples/HorizontalWithinVerticalScrolling/Sample/ViewController.h +++ b/examples/HorizontalWithinVerticalScrolling/Sample/ViewController.h @@ -9,6 +9,6 @@ #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/Kittens/Sample/ViewController.h b/examples/Kittens/Sample/ViewController.h index 560b6a2d..8e8bc18b 100644 --- a/examples/Kittens/Sample/ViewController.h +++ b/examples/Kittens/Sample/ViewController.h @@ -9,6 +9,6 @@ #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/LayoutSpecExamples-Swift/Sample/LayoutExampleViewController.swift b/examples/LayoutSpecExamples-Swift/Sample/LayoutExampleViewController.swift index 25a39169..09bea303 100644 --- a/examples/LayoutSpecExamples-Swift/Sample/LayoutExampleViewController.swift +++ b/examples/LayoutSpecExamples-Swift/Sample/LayoutExampleViewController.swift @@ -9,7 +9,7 @@ import AsyncDisplayKit -class LayoutExampleViewController: ASViewController { +class LayoutExampleViewController: ASDKViewController { let customNode: LayoutExampleNode diff --git a/examples/LayoutSpecExamples-Swift/Sample/OverviewViewController.swift b/examples/LayoutSpecExamples-Swift/Sample/OverviewViewController.swift index 0c9110a3..553d9eb1 100644 --- a/examples/LayoutSpecExamples-Swift/Sample/OverviewViewController.swift +++ b/examples/LayoutSpecExamples-Swift/Sample/OverviewViewController.swift @@ -9,7 +9,7 @@ import AsyncDisplayKit -class OverviewViewController: ASViewController { +class OverviewViewController: ASDKViewController { let tableNode = ASTableNode() let layoutExamples: [LayoutExampleNode.Type] diff --git a/examples/LayoutSpecExamples/Sample/LayoutExampleViewController.h b/examples/LayoutSpecExamples/Sample/LayoutExampleViewController.h index d087bcc7..184032dd 100644 --- a/examples/LayoutSpecExamples/Sample/LayoutExampleViewController.h +++ b/examples/LayoutSpecExamples/Sample/LayoutExampleViewController.h @@ -9,7 +9,7 @@ #import -@interface LayoutExampleViewController : ASViewController +@interface LayoutExampleViewController : ASDKViewController - (instancetype)initWithLayoutExampleClass:(Class)layoutExampleClass NS_DESIGNATED_INITIALIZER; - (instancetype)initWithNode:(ASDisplayNode *)node NS_UNAVAILABLE; @end diff --git a/examples/LayoutSpecExamples/Sample/OverviewViewController.h b/examples/LayoutSpecExamples/Sample/OverviewViewController.h index 83381429..a012b402 100644 --- a/examples/LayoutSpecExamples/Sample/OverviewViewController.h +++ b/examples/LayoutSpecExamples/Sample/OverviewViewController.h @@ -10,6 +10,6 @@ #import -@interface OverviewViewController : ASViewController +@interface OverviewViewController : ASDKViewController @end diff --git a/examples/PagerNode/Sample/ViewController.h b/examples/PagerNode/Sample/ViewController.h index 3af731c8..a474218c 100644 --- a/examples/PagerNode/Sample/ViewController.h +++ b/examples/PagerNode/Sample/ViewController.h @@ -9,6 +9,6 @@ #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/README.md b/examples/README.md index 39fac1c1..f35f5d0b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -36,12 +36,12 @@ Featuring: ![ASTableViewStressTest Example App Screenshot](https://github.com/AsyncDisplayKit/Documentation/raw/master/docs/static/images/example-app-screenshots/ASTableViewStressTest.png) -### ASViewController [ObjC] +### ASDKViewController [ObjC] -![ASViewController Example App Screenshot](https://github.com/AsyncDisplayKit/Documentation/raw/master/docs/static/images/example-app-screenshots/ASViewController.png) +![ASDKViewController Example App Screenshot](https://github.com/AsyncDisplayKit/Documentation/raw/master/docs/static/images/example-app-screenshots/ASDKViewController.png) Featuring: -- ASViewController +- ASDKViewController - ASTableView - ASMultiplexImageNode - ASLayoutSpec @@ -56,7 +56,7 @@ Featuring: Featuring: - ASDK Swift compatibility -- ASViewController +- ASDKViewController - ASCollectionView - thread affinity - ASLayoutSpec @@ -150,7 +150,7 @@ Featuring: ![Swift Example App Screenshot](https://github.com/AsyncDisplayKit/Documentation/raw/master/docs/static/images/example-app-screenshots/Swift.png) Featuring: -- ASViewController with ASTableNode +- ASDKViewController with ASTableNode ### SynchronousConcurrency [ObjC] @@ -169,7 +169,7 @@ The internal features are: Also provided are two such implementations: -[ASCellNode setNeverShowPlaceholders:], which integrates with both Tables and Collections --[ASViewController setNeverShowPlaceholders:], which should work with Nav and Tab controllers. +-[ASDKViewController setNeverShowPlaceholders:], which should work with Nav and Tab controllers. Lastly, on ASDisplayNode, a new property .shouldBypassEnsureDisplay allows individual node types to exempt themselves from blocking the main thread on their display. diff --git a/examples/SocialAppLayout-Inverted/Sample/ViewController.h b/examples/SocialAppLayout-Inverted/Sample/ViewController.h index 64162422..f3c06cc3 100644 --- a/examples/SocialAppLayout-Inverted/Sample/ViewController.h +++ b/examples/SocialAppLayout-Inverted/Sample/ViewController.h @@ -9,5 +9,5 @@ #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/SocialAppLayout/Sample/ViewController.h b/examples/SocialAppLayout/Sample/ViewController.h index 64162422..f3c06cc3 100644 --- a/examples/SocialAppLayout/Sample/ViewController.h +++ b/examples/SocialAppLayout/Sample/ViewController.h @@ -9,5 +9,5 @@ #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples/Swift/Sample/ViewController.swift b/examples/Swift/Sample/ViewController.swift index 8384906c..7a7c2d3e 100644 --- a/examples/Swift/Sample/ViewController.swift +++ b/examples/Swift/Sample/ViewController.swift @@ -10,7 +10,7 @@ import UIKit import AsyncDisplayKit -final class ViewController: ASViewController, ASTableDataSource, ASTableDelegate { +final class ViewController: ASDKViewController, ASTableDataSource, ASTableDelegate { struct State { var itemCount: Int diff --git a/examples_extra/ASDKgram-Swift/ASDKgram-Swift/PhotoFeedTableNodeController.swift b/examples_extra/ASDKgram-Swift/ASDKgram-Swift/PhotoFeedTableNodeController.swift index 6c2fe39f..4cade0c9 100644 --- a/examples_extra/ASDKgram-Swift/ASDKgram-Swift/PhotoFeedTableNodeController.swift +++ b/examples_extra/ASDKgram-Swift/ASDKgram-Swift/PhotoFeedTableNodeController.swift @@ -9,7 +9,7 @@ import AsyncDisplayKit -class PhotoFeedTableNodeController: ASViewController { +class PhotoFeedTableNodeController: ASDKViewController { // MARK: Lifecycle diff --git a/examples_extra/ASTraitCollection/Sample/CollectionViewController.h b/examples_extra/ASTraitCollection/Sample/CollectionViewController.h index 0528310b..2cb38813 100644 --- a/examples_extra/ASTraitCollection/Sample/CollectionViewController.h +++ b/examples_extra/ASTraitCollection/Sample/CollectionViewController.h @@ -9,5 +9,5 @@ #import -@interface CollectionViewController : ASViewController +@interface CollectionViewController : ASDKViewController @end diff --git a/examples_extra/ASTraitCollection/Sample/KittenNode.h b/examples_extra/ASTraitCollection/Sample/KittenNode.h index 17655e07..47f5ee44 100644 --- a/examples_extra/ASTraitCollection/Sample/KittenNode.h +++ b/examples_extra/ASTraitCollection/Sample/KittenNode.h @@ -17,5 +17,5 @@ // The default action when an image node is tapped. This action will create an // OverrideVC and override its display traits to always be compact. -+ (void)defaultImageTappedAction:(ASViewController *)sourceViewController; ++ (void)defaultImageTappedAction:(ASDKViewController *)sourceViewController; @end diff --git a/examples_extra/ASTraitCollection/Sample/KittenNode.m b/examples_extra/ASTraitCollection/Sample/KittenNode.m index 1526563e..f0d32ac0 100644 --- a/examples_extra/ASTraitCollection/Sample/KittenNode.m +++ b/examples_extra/ASTraitCollection/Sample/KittenNode.m @@ -143,7 +143,7 @@ static const CGFloat kInnerPadding = 10.0f; return [ASInsetLayoutSpec insetLayoutSpecWithInsets:UIEdgeInsetsMake(kOuterPadding, kOuterPadding, kOuterPadding, kOuterPadding) child:stackSpec]; } -+ (void)defaultImageTappedAction:(ASViewController *)sourceViewController ++ (void)defaultImageTappedAction:(ASDKViewController *)sourceViewController { OverrideViewController *overrideVC = [[OverrideViewController alloc] init]; diff --git a/examples_extra/ASTraitCollection/Sample/OverrideViewController.h b/examples_extra/ASTraitCollection/Sample/OverrideViewController.h index f5de270a..6cef2af9 100644 --- a/examples_extra/ASTraitCollection/Sample/OverrideViewController.h +++ b/examples_extra/ASTraitCollection/Sample/OverrideViewController.h @@ -22,6 +22,6 @@ * This is a fairly stupid VC that's main purpose is to show how to override ASDisplayTraits. * Take a look at `defaultImageTappedAction` in KittenNode to see how this is accomplished. */ -@interface OverrideViewController : ASViewController +@interface OverrideViewController : ASDKViewController @property (nonatomic, copy) dispatch_block_t closeBlock; @end diff --git a/examples_extra/ASTraitCollection/Sample/TableViewController.h b/examples_extra/ASTraitCollection/Sample/TableViewController.h index bfb5fad6..4bb66b38 100644 --- a/examples_extra/ASTraitCollection/Sample/TableViewController.h +++ b/examples_extra/ASTraitCollection/Sample/TableViewController.h @@ -9,6 +9,6 @@ #import -@interface TableViewController : ASViewController +@interface TableViewController : ASDKViewController @end diff --git a/examples_extra/ASTraitCollection/Sample/ViewController.h b/examples_extra/ASTraitCollection/Sample/ViewController.h index 4499f93b..dd2097b3 100644 --- a/examples_extra/ASTraitCollection/Sample/ViewController.h +++ b/examples_extra/ASTraitCollection/Sample/ViewController.h @@ -9,6 +9,6 @@ #import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples_extra/BackgroundPropertySetting/Sample/ViewController.swift b/examples_extra/BackgroundPropertySetting/Sample/ViewController.swift index 47faf438..6024611a 100644 --- a/examples_extra/BackgroundPropertySetting/Sample/ViewController.swift +++ b/examples_extra/BackgroundPropertySetting/Sample/ViewController.swift @@ -10,7 +10,7 @@ import UIKit import AsyncDisplayKit -final class ViewController: ASViewController, ASCollectionDelegate, ASCollectionDataSource { +final class ViewController: ASDKViewController, ASCollectionDelegate, ASCollectionDataSource { let itemCount = 1000 let itemSize: CGSize diff --git a/examples_extra/Multiplex/Sample/ViewController.h b/examples_extra/Multiplex/Sample/ViewController.h index 27738fcb..bf961232 100644 --- a/examples_extra/Multiplex/Sample/ViewController.h +++ b/examples_extra/Multiplex/Sample/ViewController.h @@ -7,8 +7,8 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // -#import +#import -@interface ViewController : ASViewController +@interface ViewController : ASDKViewController @end diff --git a/examples_extra/RepoSearcher/RepoSearcher/SearchViewController.swift b/examples_extra/RepoSearcher/RepoSearcher/SearchViewController.swift index 59556d4b..ec108c2a 100644 --- a/examples_extra/RepoSearcher/RepoSearcher/SearchViewController.swift +++ b/examples_extra/RepoSearcher/RepoSearcher/SearchViewController.swift @@ -12,7 +12,7 @@ import IGListKit class SearchToken: NSObject {} -final class SearchViewController: ASViewController { +final class SearchViewController: ASDKViewController { lazy var adapter: ListAdapter = { return ListAdapter(updater: ListAdapterUpdater(), viewController: self, workingRangeSize: 0) diff --git a/examples_extra/Shop/Shop/Scenes/Product/ProductViewController.swift b/examples_extra/Shop/Shop/Scenes/Product/ProductViewController.swift index 9d36298e..0d406b57 100644 --- a/examples_extra/Shop/Shop/Scenes/Product/ProductViewController.swift +++ b/examples_extra/Shop/Shop/Scenes/Product/ProductViewController.swift @@ -8,7 +8,7 @@ import UIKit -class ProductViewController: ASViewController { +class ProductViewController: ASDKViewController { // MARK: - Variables diff --git a/examples_extra/Shop/Shop/Scenes/Products/ProductsCollectionViewController.swift b/examples_extra/Shop/Shop/Scenes/Products/ProductsCollectionViewController.swift index caa5278f..f96834a0 100644 --- a/examples_extra/Shop/Shop/Scenes/Products/ProductsCollectionViewController.swift +++ b/examples_extra/Shop/Shop/Scenes/Products/ProductsCollectionViewController.swift @@ -8,7 +8,7 @@ import UIKit -class ProductsCollectionViewController: ASViewController { +class ProductsCollectionViewController: ASDKViewController { // MARK: - Variables diff --git a/examples_extra/Shop/Shop/Scenes/Products/ProductsTableViewController.swift b/examples_extra/Shop/Shop/Scenes/Products/ProductsTableViewController.swift index bfb851a3..533afe2c 100644 --- a/examples_extra/Shop/Shop/Scenes/Products/ProductsTableViewController.swift +++ b/examples_extra/Shop/Shop/Scenes/Products/ProductsTableViewController.swift @@ -8,7 +8,7 @@ import UIKit -class ProductsTableViewController: ASViewController { +class ProductsTableViewController: ASDKViewController { // MARK: - Variables diff --git a/examples_extra/Shop/Shop/Scenes/Shop/ShopViewController.swift b/examples_extra/Shop/Shop/Scenes/Shop/ShopViewController.swift index 8feefa3f..bea9f86a 100644 --- a/examples_extra/Shop/Shop/Scenes/Shop/ShopViewController.swift +++ b/examples_extra/Shop/Shop/Scenes/Shop/ShopViewController.swift @@ -8,7 +8,7 @@ import UIKit -class ShopViewController: ASViewController { +class ShopViewController: ASDKViewController { // MARK: - Variables diff --git a/examples_extra/SynchronousConcurrency/Sample/AsyncViewController.h b/examples_extra/SynchronousConcurrency/Sample/AsyncViewController.h index 2c20ade6..0df52838 100644 --- a/examples_extra/SynchronousConcurrency/Sample/AsyncViewController.h +++ b/examples_extra/SynchronousConcurrency/Sample/AsyncViewController.h @@ -7,8 +7,8 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // -#import +#import -@interface AsyncViewController : ASViewController +@interface AsyncViewController : ASDKViewController @end diff --git a/examples_extra/TextStressTest/Sample/CollectionViewController.h b/examples_extra/TextStressTest/Sample/CollectionViewController.h index d9329bdb..419f634d 100644 --- a/examples_extra/TextStressTest/Sample/CollectionViewController.h +++ b/examples_extra/TextStressTest/Sample/CollectionViewController.h @@ -9,5 +9,5 @@ #import #import -@interface CollectionViewController : ASViewController +@interface CollectionViewController : ASDKViewController @end