[Layout Transition] Add default fade in / out layout transition (#2052)

* Add default fade in / out layout transition

* Add example for layout transition

* Update for recent layout transition API changes

* To be able to do a layoutTransition the node needs to be loaded

* Rename layoutTransitionDuration to defaultLayoutTransitionDuration

* Expose default layout transition duration delay and options

* Use `UIViewAnimationOptionBeginFromCurrentState` for initial defaultLayoutTransitionOptions
This commit is contained in:
Michael Schneider
2016-08-13 17:35:20 -07:00
committed by Adlai Holler
parent 43370fe6ff
commit adcc9afb5a
17 changed files with 945 additions and 4 deletions

View File

@@ -749,6 +749,23 @@ NS_ASSUME_NONNULL_BEGIN
@interface ASDisplayNode (LayoutTransitioning)
/**
* @abstract The amount of time it takes to complete the default transition animation. Default is 0.2.
*/
@property (nonatomic, assign) NSTimeInterval defaultLayoutTransitionDuration;
/**
* @abstract The amount of time (measured in seconds) to wait before beginning the default transition animation.
* Default is 0.0.
*/
@property (nonatomic, assign) NSTimeInterval defaultLayoutTransitionDelay;
/**
* @abstract A mask of options indicating how you want to perform the default transition animations.
* For a list of valid constants, see UIViewAnimationOptions.
*/
@property (nonatomic, assign) UIViewAnimationOptions defaultLayoutTransitionOptions;
/**
* @discussion A place to perform your animation. New nodes have been inserted here. You can also use this time to re-order the hierarchy.
*/