diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 3f8ead4373..54285a8448 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -14,6 +14,8 @@ #import "ASDataController.h" #import "ASDisplayNodeInternal.h" +const static NSUInteger kASCollectionViewAnimationNone = 0; + #pragma mark - #pragma mark Proxying. @@ -137,7 +139,7 @@ static BOOL _isInterceptedSelector(SEL sel) ASDisplayNodePerformBlockOnMainThread(^{ [super reloadData]; }); - [_dataController reloadData]; + [_dataController reloadDataWithAnimationOption:kASCollectionViewAnimationNone]; } - (void)setDataSource:(id)dataSource @@ -202,42 +204,42 @@ static BOOL _isInterceptedSelector(SEL sel) - (void)insertSections:(NSIndexSet *)sections { - [_dataController insertSections:sections]; + [_dataController insertSections:sections withAnimationOption:kASCollectionViewAnimationNone]; } - (void)deleteSections:(NSIndexSet *)sections { - [_dataController deleteSections:sections]; + [_dataController deleteSections:sections withAnimationOption:kASCollectionViewAnimationNone]; } - (void)reloadSections:(NSIndexSet *)sections { - [_dataController reloadSections:sections]; + [_dataController reloadSections:sections withAnimationOption:kASCollectionViewAnimationNone]; } - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection { - [_dataController moveSection:section toSection:newSection]; + [_dataController moveSection:section toSection:newSection withAnimationOption:kASCollectionViewAnimationNone]; } - (void)insertItemsAtIndexPaths:(NSArray *)indexPaths { - [_dataController insertRowsAtIndexPaths:indexPaths]; + [_dataController insertRowsAtIndexPaths:indexPaths withAnimationOption:kASCollectionViewAnimationNone]; } - (void)deleteItemsAtIndexPaths:(NSArray *)indexPaths { - [_dataController deleteRowsAtIndexPaths:indexPaths]; + [_dataController deleteRowsAtIndexPaths:indexPaths withAnimationOption:kASCollectionViewAnimationNone]; } - (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths { - [_dataController reloadRowsAtIndexPaths:indexPaths]; + [_dataController reloadRowsAtIndexPaths:indexPaths withAnimationOption:kASCollectionViewAnimationNone]; } - (void)moveItemAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath { - [_dataController moveRowAtIndexPath:indexPath toIndexPath:newIndexPath]; + [_dataController moveRowAtIndexPath:indexPath toIndexPath:newIndexPath withAnimationOption:kASCollectionViewAnimationNone]; } @@ -367,7 +369,7 @@ static BOOL _isInterceptedSelector(SEL sel) return [_dataController nodesAtIndexPaths:indexPaths]; } -- (void)rangeController:(ASRangeController *)rangeController didInsertNodesAtIndexPaths:(NSArray *)indexPaths +- (void)rangeController:(ASRangeController *)rangeController didInsertNodesAtIndexPaths:(NSArray *)indexPaths withAnimationOption:(ASDataControllerAnimationOptions)animationOption { ASDisplayNodeAssertMainThread(); [UIView performWithoutAnimation:^{ @@ -375,7 +377,7 @@ static BOOL _isInterceptedSelector(SEL sel) }]; } -- (void)rangeController:(ASRangeController *)rangeController didDeleteNodesAtIndexPaths:(NSArray *)indexPaths +- (void)rangeController:(ASRangeController *)rangeController didDeleteNodesAtIndexPaths:(NSArray *)indexPaths withAnimationOption:(ASDataControllerAnimationOptions)animationOption { ASDisplayNodeAssertMainThread(); [UIView performWithoutAnimation:^{ @@ -383,7 +385,7 @@ static BOOL _isInterceptedSelector(SEL sel) }]; } -- (void)rangeController:(ASRangeController *)rangeController didInsertSectionsAtIndexSet:(NSIndexSet *)indexSet +- (void)rangeController:(ASRangeController *)rangeController didInsertSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOption:(ASDataControllerAnimationOptions)animationOption { ASDisplayNodeAssertMainThread(); [UIView performWithoutAnimation:^{ @@ -391,7 +393,7 @@ static BOOL _isInterceptedSelector(SEL sel) }]; } -- (void)rangeController:(ASRangeController *)rangeController didDeleteSectionsAtIndexSet:(NSIndexSet *)indexSet +- (void)rangeController:(ASRangeController *)rangeController didDeleteSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOption:(ASDataControllerAnimationOptions)animationOption { ASDisplayNodeAssertMainThread(); [UIView performWithoutAnimation:^{