Clean up node transition API

This commit is contained in:
Levi McCallum
2016-02-09 16:24:24 -08:00
parent 3444fa18dd
commit a00e9bb41c
3 changed files with 19 additions and 3 deletions

View File

@@ -50,10 +50,18 @@
- (void)didCompleteLayoutTransition:(id<ASContextTransitioning>)context;
/**
* @abstract Invalidates the current layout and begins a relayout of the node to the new layout returned in `calculateLayoutThatFits:`.
* @abstract Transitions the current layout with a new constrained size.
*
* @discussion Animation is optional, but will still proceed through the `transitionLayout` methods with `isAnimated == NO`.
* @discussion Animation is optional, but will still proceed through your `animateLayoutTransition` implementation with `isAnimated == NO`.
* If the passed constrainedSize is the the same as the node's current constrained size, this method is noop.
*/
- (ASLayout *)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize animated:(BOOL)animated;
/**
* @abstract Invalidates the current layout and begins a relayout of the node with the current `constrainedSize`.
*
* @discussion Animation is optional, but will still proceed through your `animateLayoutTransition` implementation with `isAnimated == NO`.
*/
- (ASLayout *)transitionLayoutWithAnimation:(BOOL)animated;
@end