mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-12 15:26:52 +00:00
* 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"
29 lines
924 B
Objective-C
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
|