当您实现可食用视图委托时,尝试将其添加到类中:
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
automaticEditControlsDidShow = NO;
[super setEditing:editing animated:animated];
if (editing) {
automaticEditControlsDidShow = YES;
[self.tableView insertRowsAtIndexPaths:addRow withRowAnimation:UITableViewRowAnimationLeft];
} else {
[self.tableView deleteRowsAtIndexPaths:addRow withRowAnimation:UITableViewRowAnimationLeft];
}
}
或者尝试实现你的editingStyleForRowAtIndexPath
方法。例如:
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
return UITableViewCellEditingStyleDelete;
}