I have create a UITableView
in editing mode, I force it run into editing mode on viewDidLoad function of a viewcontroller containing this tableview. Everything is fine, each row of table has a delete icon on the left, re-arrange
icon on the right. I implemented
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
return UITableViewCellEditingStyleDelete;
}
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
The problem is on each row I don't want to show a red delete icon on the left, just show a re-arrange icon on the right. When user want to delete, he/she can swipe a row to delete.
The reason I want to do this is I don't encourage user to delete a row product. I understand I can put a Edit button, when user click on this button, I turn into Edit mode, but I don't want to do so, I want to display a re-arrange function on the beginning when user go into my viewcontroller.
Can I do so.
Let me put some screen shot
The first image is what I got.
The second image is what I actually want to show. When user swipe I want to show a Delete button overlay the arrange icon on the right