views:

65

answers:

1

Hi,

I am looking for a way of preventing the deleting of one of my cells. (no delete button should appear next to the cell when the table view is in editing mode)

How can this be made possible?

Thanks :)

+1  A: 

Implement editingStyleForRowAtIndexPath and return UITableViewCellEditingStyleNone for that row:

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.section == sss && indexPath.row == rrr)
        return UITableViewCellEditingStyleNone;
    else
        return UITableViewCellEditingStyleDelete;
}
DyingCactus
That's what I thought it would be...thanks very much for your answer!
David Schiefer