I have a UITABLEVIEW where I want to show the delete function for only certain cells (that is, certain cells are user deletable certain cells aren't). As far as I can tell, seteditable: is only set at the table level. Is there a way to override this or hide the delete button on certain cells?
+5
A:
You should implement
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
in tableview delegate. There you can return appropriate editing style for your cells: UITableViewCellEditingStyleDelete for deletable cells, UITableViewCellEditingStyleNone for others
Vladimir
2009-11-18 14:41:09