Ios – ny way to hide “-” (Delete) button while editing UITableView

cocoaiosiphoneuitableview

On my iphone app, I have a UITableView in edit mode, where user is allowed only to reorder the rows no delete permission is given.

So is there any way where I can hide "-" red button from TableView. Please let me know.

Thanks

Best Answer

Here is my complete solution, without indentation (0left align) of the cell!

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

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

- (BOOL)tableView:(UITableView *)tableview shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath {
    return NO;
}


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