forked from TextureGroup/Texture
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathASCollectionElement.h
More file actions
47 lines (37 loc) · 1.56 KB
/
Copy pathASCollectionElement.h
File metadata and controls
47 lines (37 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// ASCollectionElement.h
// Texture
//
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
// Changes after 4/13/2017 are: Copyright (c) Pinterest, Inc. All rights reserved.
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//
#import <AsyncDisplayKit/ASDataController.h>
#import <AsyncDisplayKit/ASTraitCollection.h>
@class ASDisplayNode;
@protocol ASRangeManagingNode;
NS_ASSUME_NONNULL_BEGIN
AS_SUBCLASSING_RESTRICTED
@interface ASCollectionElement : NSObject
@property (nullable, nonatomic, copy, readonly) NSString *supplementaryElementKind;
@property (nonatomic) ASSizeRange constrainedSize;
@property (nonatomic, weak, readonly) id<ASRangeManagingNode> owningNode;
@property (nonatomic) ASPrimitiveTraitCollection traitCollection;
@property (nullable, nonatomic, readonly) id nodeModel;
- (instancetype)initWithNodeModel:(nullable id)nodeModel
nodeBlock:(ASCellNodeBlock)nodeBlock
supplementaryElementKind:(nullable NSString *)supplementaryElementKind
constrainedSize:(ASSizeRange)constrainedSize
owningNode:(id<ASRangeManagingNode>)owningNode
traitCollection:(ASPrimitiveTraitCollection)traitCollection;
/**
* @return The node, running the node block if necessary. The node block will be discarded
* after the first time it is run.
*/
@property (readonly) ASCellNode *node;
/**
* @return The node, if the node block has been run already.
*/
@property (nullable, readonly) ASCellNode *nodeIfAllocated;
@end
NS_ASSUME_NONNULL_END