views:

348

answers:

1

I have an iphone app using a uitableview where I'd like the "reorder" controls to always be displayed, and have the user swipe to delete rows.

The approach I'm currently taking is to put the tableview in edit mode and allow selection in edit mode

self.tableView.editing = YES;
self.tableView.allowsSelectionDuringEditing = YES;

I then hide the red delete circles using

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

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

I cant figure out how to get the swipe gesture to bring up the "delete" on the right side when the tableview is already in edit mode, can somebody point me in the right direction?

alternatively, if someone knows how to get the cell reordering controls to show when NOT in edit mode, that would also be a workable solution

cheers