views:

133

answers:

1

I've implemented that default swipe-to-delete gesture in UITableView, and now I feel that this default button actually doesn't look good in the context. Also, it seems to not be localized. In french it still shows "delete" as text.

How can I provide a custom button here? This is how I implemented that guy:

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    // do stuff, a lot of stuff...really a lot...
}
+3  A: 

You want tableView:titleForDeleteConfirmationButtonForRowAtIndexPath: in the UITableViewDelegate protocol.

jasoncrawford
so that's for changing the title only. But could I also change the button itself? Or must I provide my own implementation then?
dontWatchMyProfile
I don't think you can easily change the button, just the title. If you want a totally different button, I *think* you have to totally re-implement the swipe-to-delete gesture, the button animation, everything.
jasoncrawford