I read about table view and it's editing styles but I have some problems as there is only three editing style as follow:
UITableViewCellEditingStyleNone
UITableViewCellEditingStyleDelete
UITableViewCellEditingStyleInsert
I want to have reordering the tableview cells which I implemented successfully using it's delegates.
-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{
return YES;
}
-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
return UITableViewCellEditingStyleNone;
}
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{
//handle the editing style
}
-(NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath{
//move cells
}
-(BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath{
return YES;
}
I don't want to use UITableViewCellEditingStyleDelete
as it shows a red circular button on table view. Instead of this I want swipe-to-delete and the reordering functionality together.
Is there any way to implement this?