Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I localize a standard iOS control?

I'm writing an iPhone app that has a table cell with the style UITableViewCellEditingStyleDelete. This causes the cell to be displayed with a red circle enclosing a minus sign on the left side. Fine so far. It also has a Delete button (rectangular button with the text "Delete") on the right side. I need to change the text "Delete" for localization to other languages. Where is this text defined?

like image 523
Andrew Avatar asked Dec 05 '22 18:12

Andrew


1 Answers

You should take a look at the following method in the UITableViewDelegate Protocol:

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath

See the docs.

like image 95
sudo rm -rf Avatar answered Dec 30 '22 13:12

sudo rm -rf