Swiftgram/AsyncDisplayKit/Details/ASIndexedNodeContext.h
ricky 01dbc86778 First pass of comments
* make variable naming reflect ASEnvironmentTraitCollection vs ASTraitCollection
* move trait propagation to cell allocation instead of via a nested block
* move trait propagation when setting a displaynode's supernode instead of when adding a subnode
* fixed misspelling of "colection"
2016-06-03 09:59:24 -07:00

29 lines
924 B
Objective-C

//
// ASIndexedNodeContext.h
// AsyncDisplayKit
//
// Created by Huy Nguyen on 2/28/16.
// Copyright © 2016 Facebook. All rights reserved.
//
#import <AsyncDisplayKit/ASDataController.h>
#import <AsyncDisplayKit/ASEnvironment.h>
@interface ASIndexedNodeContext : NSObject
@property (nonatomic, readonly, strong) NSIndexPath *indexPath;
@property (nonatomic, readonly, assign) ASSizeRange constrainedSize;
@property (nonatomic, readonly, assign) ASEnvironmentTraitCollection environmentTraitCollection;
- (instancetype)initWithNodeBlock:(ASCellNodeBlock)nodeBlock
indexPath:(NSIndexPath *)indexPath
constrainedSize:(ASSizeRange)constrainedSize
environmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection;
/**
* Returns a node allocated by executing node block. Node block will be nil out immediately.
*/
- (ASCellNode *)allocateNode;
@end