Skip to content

Commit

Permalink
Renames AS_EXTERN and ASViewController (facebookarchive#1876)
Browse files Browse the repository at this point in the history
* Renames AS_EXTERN and ASViewController

To ASDK_EXTERN and ASDKViewController.
This is to avoid conflicting with AuthenticationServices in
Xcode 12

* Fix up examples and docs

* Add bit about updating ASViewController rename
  • Loading branch information
garrettmoon authored Jun 29, 2020
1 parent 8e91008 commit c5f69f0
Show file tree
Hide file tree
Showing 111 changed files with 338 additions and 337 deletions.
24 changes: 12 additions & 12 deletions AsyncDisplayKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -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, ); }; };
Expand Down Expand Up @@ -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, ); }; };
Expand Down Expand Up @@ -779,7 +779,7 @@
9C70F2021CDA4EFA007D6C76 /* ASTraitCollection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASTraitCollection.mm; sourceTree = "<group>"; };
9C8898BA1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASTextKitFontSizeAdjuster.mm; path = TextKit/ASTextKitFontSizeAdjuster.mm; sourceTree = "<group>"; };
9CDC18CB1B910E12004965E2 /* ASLayoutElementPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASLayoutElementPrivate.h; sourceTree = "<group>"; };
9CFFC6BF1CCAC73C006A6476 /* ASViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASViewController.mm; sourceTree = "<group>"; };
9CFFC6BF1CCAC73C006A6476 /* ASDKViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASDKViewController.mm; sourceTree = "<group>"; };
9CFFC6C11CCAC768006A6476 /* ASTableNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASTableNode.mm; sourceTree = "<group>"; };
9D302F9A2231B07E005739C3 /* ASButtonNode+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ASButtonNode+Private.h"; sourceTree = "<group>"; };
9D302F9C2231B373005739C3 /* ASButtonNode+Yoga.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ASButtonNode+Yoga.h"; sourceTree = "<group>"; };
Expand All @@ -803,7 +803,7 @@
AC6145421D8AFD4F003D62A2 /* ASSection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASSection.mm; path = ../Private/ASSection.mm; sourceTree = "<group>"; };
AC6456071B0A335000CF11B8 /* ASCellNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASCellNode.mm; sourceTree = "<group>"; };
AC7A2C161BDE11DF0093FE1A /* ASTableViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASTableViewInternal.h; sourceTree = "<group>"; };
ACC945A81BA9E7A0005E1FB8 /* ASViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASViewController.h; sourceTree = "<group>"; };
ACC945A81BA9E7A0005E1FB8 /* ASDKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASDKViewController.h; sourceTree = "<group>"; };
ACE87A2B1D73696800D7FF06 /* ASSectionContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASSectionContext.h; path = Details/ASSectionContext.h; sourceTree = "<group>"; };
ACF6ED011B17843500DA7C62 /* ASBackgroundLayoutSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASBackgroundLayoutSpec.h; sourceTree = "<group>"; };
ACF6ED021B17843500DA7C62 /* ASBackgroundLayoutSpec.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = ASBackgroundLayoutSpec.mm; sourceTree = "<group>"; };
Expand Down Expand Up @@ -923,7 +923,7 @@
CC8B05D41D73836400F54286 /* ASPerformanceTestContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASPerformanceTestContext.h; sourceTree = "<group>"; };
CC8B05D51D73836400F54286 /* ASPerformanceTestContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASPerformanceTestContext.mm; sourceTree = "<group>"; };
CC8B05D71D73979700F54286 /* ASTextNodePerformanceTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASTextNodePerformanceTests.mm; sourceTree = "<group>"; };
CCA221D21D6FA7EF00AF6A0F /* ASViewControllerTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASViewControllerTests.mm; sourceTree = "<group>"; };
CCA221D21D6FA7EF00AF6A0F /* ASDKViewControllerTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASDKViewControllerTests.mm; sourceTree = "<group>"; };
CCA282B21E9EA7310037E8B7 /* ASTipsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASTipsController.h; sourceTree = "<group>"; };
CCA282B31E9EA7310037E8B7 /* ASTipsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASTipsController.mm; sourceTree = "<group>"; };
CCA282B61E9EA8E40037E8B7 /* AsyncDisplayKit+Tips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AsyncDisplayKit+Tips.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down
6 changes: 3 additions & 3 deletions Source/ASCellNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#import <AsyncDisplayKit/ASTextNode.h>
#import <AsyncDisplayKit/ASCollectionNode.h>

#import <AsyncDisplayKit/ASViewController.h>
#import <AsyncDisplayKit/ASDKViewController.h>
#import <AsyncDisplayKit/ASInsetLayoutSpec.h>
#import <AsyncDisplayKit/ASDisplayNodeInternal.h>

Expand Down Expand Up @@ -79,8 +79,8 @@ - (void)didLoad
_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 {
Expand Down
4 changes: 2 additions & 2 deletions Source/ASConfigurationInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Source/ASContextTransitioning.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NSObject>

Expand Down
16 changes: 8 additions & 8 deletions Source/ASViewController.h → Source/ASDKViewController.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// ASViewController.h
// ASDKViewController.h
// Texture
//
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
Expand All @@ -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 <ASVisibilityDepth>
@interface ASDKViewController<__covariant DisplayNodeType : ASDisplayNode *> : UIViewController <ASVisibilityDepth>

/**
* 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
*/
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Source/ASViewController.mm → Source/ASDKViewController.mm
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
//
// ASViewController.mm
// ASDKViewController.mm
// Texture
//
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
// Changes after 4/13/2017 are: Copyright (c) Pinterest, Inc. All rights reserved.
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//

#import <AsyncDisplayKit/ASViewController.h>
#import <AsyncDisplayKit/ASDKViewController.h>
#import <AsyncDisplayKit/ASDisplayNode+FrameworkPrivate.h>
#import <AsyncDisplayKit/ASLog.h>
#import <AsyncDisplayKit/ASRangeControllerUpdateRangeProtocol+Beta.h>
#import <AsyncDisplayKit/ASInternalHelpers.h>
#import <AsyncDisplayKit/ASConfigurationInternal.h>

@implementation ASViewController
@implementation ASDKViewController
{
BOOL _ensureDisplayed;
BOOL _automaticallyAdjustRangeModeBasedOnViewEvents;
Expand Down Expand Up @@ -185,7 +185,7 @@ - (void)_updateNodeFallbackSafeArea

- (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];
Expand Down Expand Up @@ -323,13 +323,13 @@ - (void)propagateNewTraitCollection:(ASPrimitiveTraitCollection)traitCollection
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]];
}
}
Expand Down
4 changes: 2 additions & 2 deletions Source/ASDisplayNode+Beta.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Source/ASDisplayNode+InterfaceState.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>

/**
* 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).
*
Expand Down
2 changes: 1 addition & 1 deletion Source/ASDisplayNode+Layout.mm
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ - (void)_rootNodeDidInvalidateSize
// 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.
Expand Down
Loading

0 comments on commit c5f69f0

Please sign in to comment.