[Layout] Extract layout implementation code into it's own subcategories (#272)

* Extract layout code into ASDisplayNode categories

* Category renaming and documentation

* Changelog

* Change header
This commit is contained in:
Michael Schneider
2017-05-15 11:10:59 -07:00
committed by GitHub
parent 299df0aa8c
commit b32e69d64b
7 changed files with 1038 additions and 924 deletions

View File

@@ -73,7 +73,7 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
#define TIME_DISPLAYNODE_OPS 0 // If you're using this information frequently, try: (DEBUG || PROFILE)
@interface ASDisplayNode ()
@interface ASDisplayNode () <_ASTransitionContextCompletionDelegate>
{
@package
_ASPendingState *_pendingViewState;
@@ -133,6 +133,7 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
// This is the desired contentsScale, not the scale at which the layer's contents should be displayed
CGFloat _contentsScaleForDisplay;
ASDisplayNodeMethodOverrides _methodOverrides;
UIEdgeInsets _hitTestSlop;
@@ -146,6 +147,8 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
NSTimeInterval _defaultLayoutTransitionDuration;
NSTimeInterval _defaultLayoutTransitionDelay;
UIViewAnimationOptions _defaultLayoutTransitionOptions;
ASLayoutSpecBlock _layoutSpecBlock;
int32_t _transitionID;
BOOL _transitionInProgress;
@@ -162,6 +165,7 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
Class _layerClass; // nil -> _ASDisplayLayer
UIImage *_placeholderImage;
BOOL _placeholderEnabled;
CALayer *_placeholderLayer;
// keeps track of nodes/subnodes that have not finished display, used with placeholders
@@ -200,6 +204,8 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
NSMutableArray<ASDisplayNode *> *_yogaChildren;
ASLayout *_yogaCalculatedLayout;
#endif
NSString *_debugName;
#if TIME_DISPLAYNODE_OPS
@public