[ASTextNode2] Provide compiler flag to enable ASTextNode2 for all usages. (#410)

* [ASTextNode2] Provide compiler flag to enable ASTextNode2 for all usages.

The runtime switch is helpful, but is too slow to be shipped in a large
production application where startup time is carefully optimized.

Although this doesn't pass text-related snapshot tests when enabled, it
does allow apps to rely on built-in components like ASButtonNode using
the same text stack as when they are manually creating ASTextNode2
instances.

A simpler approach would be to use a #define ASTextNode ASTextNode2,
but this would create unusual keyword highlighting in code referencing
ASTextNode. However, because it would be less invasive and this is
not on by default, we could do that instead if preferred.

* Update AsyncDisplayKit.h

* [ASTextNode2] Improve naming and documentation of ASTEXTNODE_EXPERIMENT_GLOBAL_ENABLE

* [ASTextNode2] CHANGELOG.md for #410.
This commit is contained in:
appleguy
2017-07-02 21:40:51 -07:00
committed by GitHub
parent c70a97d28f
commit 2cda73a334
9 changed files with 65 additions and 10 deletions

View File

@@ -24,6 +24,7 @@
#import <AsyncDisplayKit/ASControlNode.h>
#import <AsyncDisplayKit/ASImageNode.h>
#import <AsyncDisplayKit/ASTextNode.h>
#import <AsyncDisplayKit/ASTextNode2.h>
#import <AsyncDisplayKit/ASButtonNode.h>
#import <AsyncDisplayKit/ASMapNode.h>
#import <AsyncDisplayKit/ASVideoNode.h>