diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 24356b1b..b540c9c6 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -36,7 +36,7 @@ if ([_delegate respondsToSelector:@selector(dataController:willInsertSectionsAtIndexSet:)]) { \ [_delegate dataController:self willInsertSectionsAtIndexSet:indexSet]; \ } \ - [_nodes insertObjects:sections atIndexes:indexSet]; \ + [multidimensionalArray insertObjects:sections atIndexes:indexSet]; \ if ([_delegate respondsToSelector:@selector(dataController:didInsertSectionsAtIndexSet:)]) { \ [_delegate dataController:self didInsertSectionsAtIndexSet:indexSet]; \ } \ @@ -47,8 +47,8 @@ if ([_delegate respondsToSelector:@selector(dataController:willDeleteSectionsAtIndexSet:)]) { \ [_delegate dataController:self willDeleteSectionsAtIndexSet:indexSet]; \ } \ - [_nodes removeObjectsAtIndexes:indexSet]; \ - if ([_delegate respondsToSelector:@selector(dataController:willDeleteSectionsAtIndexSet:)]) { \ + [multidimensionalArray removeObjectsAtIndexes:indexSet]; \ + if ([_delegate respondsToSelector:@selector(dataController:didDeleteSectionsAtIndexSet:)]) { \ [_delegate dataController:self didDeleteSectionsAtIndexSet:indexSet]; \ } \ } diff --git a/AsyncDisplayKit/Details/ASFlowLayoutController.mm b/AsyncDisplayKit/Details/ASFlowLayoutController.mm index 7101a110..f2e3af3b 100644 --- a/AsyncDisplayKit/Details/ASFlowLayoutController.mm +++ b/AsyncDisplayKit/Details/ASFlowLayoutController.mm @@ -47,7 +47,7 @@ static const CGFloat kASFlowLayoutControllerRefreshingThreshold = 0.3; } - (void)deleteNodesAtIndexPaths:(NSArray *)indexPaths { - [indexPaths enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) { + [indexPaths enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) { std::vector &v = _nodeSizes[indexPath.section]; v.erase(v.begin() + indexPath.row); }]; diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index 946a7953..e147d933 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -260,7 +260,7 @@ - (void)dataController:(ASDataController *)dataController didDeleteSectionsAtIndexSet:(NSIndexSet *)indexSet { [self updateOnMainThreadWithBlock:^{ [_layoutController deleteSectionsAtIndexSet:indexSet]; - [_delegate rangeController:self didInsertSectionsAtIndexSet:indexSet]; + [_delegate rangeController:self didDeleteSectionsAtIndexSet:indexSet]; }]; }