ASDataController improvements

- _populateFromDataSourceWithSectionIndexSet doesn't accept a mutanle array but allocate one itself.
- Remove _populateFromEntireDataSourceWithMutableContexts.
- ASIndexedNodeContext executes its block, nil out the block and return the result.
This commit is contained in:
Huy Nguyen
2016-02-29 14:03:32 -08:00
parent b098d80796
commit 6d463daac7
3 changed files with 31 additions and 40 deletions

View File

@@ -7,11 +7,9 @@
//
#import <AsyncDisplayKit/ASDataController.h>
#import <AsyncDisplayKit/ASDimension.h>
@interface ASIndexedNodeContext : NSObject
@property (nonatomic, readonly, strong) ASCellNodeBlock nodeBlock;
@property (nonatomic, readonly, strong) NSIndexPath *indexPath;
@property (nonatomic, readonly, assign) ASSizeRange constrainedSize;
@@ -19,4 +17,9 @@
indexPath:(NSIndexPath *)indexPath
constrainedSize:(ASSizeRange)constrainedSize;
/**
* Returns a node allocated by executing node block. Node block will be nil out immediately.
*/
- (ASCellNode *)allocateNode;
@end