Ios UITableView编辑样式可能不显示“删除”按钮

Ios UITableView编辑样式可能不显示“删除”按钮,ios,uitableview,edit,Ios,Uitableview,Edit,有时,当UITableView处于编辑样式并且触发“删除”按钮时,此按钮可能不会显示。这种情况很少发生,但有人也遇到过同样的问题吗 发布一些代码: 在viewDidLoad中 [[self tableView] setEditing:YES animated:YES]; 表视图委托: - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return

有时,当UITableView处于编辑样式并且触发“删除”按钮时,此按钮可能不会显示。这种情况很少发生,但有人也遇到过同样的问题吗

发布一些代码:

在viewDidLoad中

[[self tableView] setEditing:YES animated:YES];
表视图委托:

    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
    return YES;
}

- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
    return YES;
}


- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (editingStyle == UITableViewCellEditingStyleDelete)
    {
        //do sth.
    }
}

请说明如何设置tableview的编辑模式。在这里输入一些代码。请添加一些您用来为TableView设置编辑模式的代码。如果您可以在特定条件下或在特定操作系统上复制此代码,您可以将其作为Apple的错误。只需编辑,添加一些代码。