UITableView禁止刷新动画问题

使用以下代码刷新tableView部分数据:

- (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation;

- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation ;

此种方法刷新需要传刷新动画类型,但即使是UITableViewRowAnimationNone刷新时还是有动画,可用以下方法解决:

[UIView performWithoutAnimation:^{
        [self.tableView reloadSection:0 withRowAnimation:UITableViewRowAnimationNone];
    }];

你可能感兴趣的:(UITableView禁止刷新动画问题)