Add first-pass view model support to collection node. #trivial (#356)

* Add first-pass view model support for collection node. Much more to come!

* Address issues

* Update the gorram license header

* Dear lord
This commit is contained in:
Adlai Holler
2017-06-12 16:50:33 -07:00
committed by GitHub
parent c297060113
commit 83111de0cc
12 changed files with 203 additions and 42 deletions

View File

@@ -590,6 +590,12 @@
return [self.dataController.pendingMap elementForItemAtIndexPath:indexPath].node;
}
- (id)viewModelForItemAtIndexPath:(NSIndexPath *)indexPath
{
[self reloadDataInitiallyIfNeeded];
return [self.dataController.pendingMap elementForItemAtIndexPath:indexPath].viewModel;
}
- (NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode
{
return [self.dataController.pendingMap indexPathForElement:cellNode.collectionElement];