//这样写可能会有动画情况
[self.tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:1 inSection:0]] withRowAnimation:UITableViewRowAnimationNone];
//解决办法
[UIView setAnimationsEnabled:NO];
[self.tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:1 inSection:0]] withRowAnimation:UITableViewRowAnimationNone];
[UIView setAnimationsEnabled:YES];
本文介绍了一个在UITableView中重新加载特定行而避免动画显示的方法。通过禁用UIView的动画,可以实现无动画效果的行更新,这对于需要即时刷新数据而不希望出现动画干扰的场景非常有用。
1469

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



