最佳答案
要获取实际的动画(而不是UITableViewRowAnimationRight
/ UITableViewRowAnimationAutomatic
)动画,只需执行
[self.tableView beginUpdates];
[self.tableView setEditing:NO animated:NO];
[self.tableView setEditing:YES animated:NO];
[self.tableView endUpdates];
beginUpdates
和endUpdates
提供了动画,并且tableView刚刚从不编辑切换为立即编辑,从而关闭了删除按钮。希望这可以帮助!
关于ios - 从UITableViewCell隐藏删除按钮,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/18697356/