add completion block to reloadData methods

This commit is contained in:
Ethan Nagel
2015-03-26 16:32:44 -07:00
parent dd10fda42c
commit 3f509dbd2f
6 changed files with 36 additions and 6 deletions

View File

@@ -205,13 +205,18 @@ static BOOL _isInterceptedSelector(SEL sel)
}
}
- (void)reloadData
- (void)reloadDataWithCompletion:(void (^)())completion
{
ASDisplayNodeAssert(self.asyncDelegate, @"ASTableView's asyncDelegate property must be set.");
ASDisplayNodePerformBlockOnMainThread(^{
[super reloadData];
});
[_dataController reloadDataWithAnimationOption:UITableViewRowAnimationNone];
[_dataController reloadDataWithAnimationOption:UITableViewRowAnimationNone completion:completion];
}
- (void)reloadData
{
[self reloadDataWithCompletion:nil];
}
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType