Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change delete button title in UITableView editing mode [duplicate]

When I call [self.tableView setEditing:YES animated:YES], the tableview goes into editing mode. When I press on the round minus button, the delete button appears. I would like to change the title of this delete button. How can I do that?

like image 935
Zia Avatar asked Mar 21 '26 17:03

Zia


1 Answers

This is easily done using the proper UITableViewDelegate method:

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath {
    return @"CustomLabel";
}
like image 71
rmaddy Avatar answered Mar 24 '26 11:03

rmaddy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!