使用以下代碼刷新tableView部分?jǐn)?shù)據(jù):
- (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation;
- (void)reloadRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation ;
此種方法刷新需要傳刷新動畫類型遏片,但即使是UITableViewRowAnimationNone刷新時還是有動畫练慕,可用以下方法解決:
[UIView performWithoutAnimation:^{
[self.tableView reloadSection:0 withRowAnimation:UITableViewRowAnimationNone];
}];