views:

19

answers:

1

When I execute toggleEdit, a red button with a white line in the middle shows up on the left (to enable delete) and a blue button with a white arrow shows up on the right of each cell in my UITable:

 -(IBAction)toggleEdit:(id)sender {
     [self.table setEditing:!self.table.editing animated:YES];
 }

The blue button on the right shows up because for each cell I have:

 cell.editingAccessoryType = UITableViewCellAccessoryDetailDisclosureButton;

Is it possible when executing toggleEdit to not show the red button on the left?

+1  A: 

Yes. In your:

 - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
 }

just return anything other than UITableViewCellEditingStyleDelete for items that are can't be deleted.

DavidPhillipOster
Sweet! I added the return as UITableViewCellEditingStyleNone and that did the trick. Thanks!
James Testa