Allow layouts to be accessible in context

This commit is contained in:
Levi McCallum
2016-02-10 14:39:46 -08:00
parent 6aae68ead4
commit 6f37bb40d9
5 changed files with 87 additions and 47 deletions

View File

@@ -8,6 +8,9 @@
#import <AsyncDisplayKit/ASDisplayNode.h>
extern NSString * const ASTransitionContextFromLayoutKey;
extern NSString * const ASTransitionContextToLayoutKey;
@protocol ASContextTransitioning <NSObject>
/**
@@ -16,19 +19,19 @@
- (BOOL)isAnimated;
/**
* @abstract The destination layout being transitioned to
* @abstract Retrieve either the "from" or "to" layout
*/
- (ASLayout *)layout;
- (ASLayout *)layoutForKey:(NSString *)key;
/**
* @abstrat The destination constrainedSize being transitioned to
* @abstract Retrieve either the "from" or "to" constrainedSize
*/
- (ASSizeRange)constrainedSize;
- (ASSizeRange)constrainedSizeForKey:(NSString *)key;
/**
* @abstract Subnodes in the new layout
* @abstract Retrieve the subnodes from either the "from" or "to" layout
*/
- (NSArray<ASDisplayNode *> *)subnodes;
- (NSArray<ASDisplayNode *> *)subnodesForKey:(NSString *)key;
/**
* @abstract Subnodes that have been inserted in the layout transition