[UIView performWithoutAnimation:^{
[self.tableView reloadRowsAtIndexPaths:@[indexPath, previousIndexPath] withRowAnimation:UITableViewRowAnimationNone];
}];
本文介绍了一种在UITableView中更新指定行而不会触发界面动画的方法。通过使用UIView的performWithoutAnimation方法,可以在不打断用户体验的前提下刷新tableView中的数据。这对于需要快速且平滑地更新UI的应用场景非常有用。
[UIView performWithoutAnimation:^{
[self.tableView reloadRowsAtIndexPaths:@[indexPath, previousIndexPath] withRowAnimation:UITableViewRowAnimationNone];
}];

被折叠的 条评论
为什么被折叠?