0

削除ボタンを追加するコードは次のとおりです。

 (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{

    return YES;
}


(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (editingStyle == UITableViewCellEditingStyleDelete) {

        NSLog(@"delete pressed");

    }
    else if (editingStyle == UITableViewCellEditingStyleInsert) {

    }
}
4

1 に答える 1