如何本地化标准iOS控件? [英] How can I localize a standard iOS control?

查看:61
本文介绍了如何本地化标准iOS控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个iPhone应用程序,其中包含一个样式为UITableViewCellEditingStyleDelete的表格单元格。这会使单元格显示为左侧包含减号的红色圆圈。好到目前为止。它还有一个删除按钮(矩形按钮,文本删除)在右侧。我需要将文本删除更改为其他语言的本地化。这个文本定义在哪里?

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?

推荐答案

你应该看看 UITableViewDelegate协议中的以下方法

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

请参阅 docs

这篇关于如何本地化标准iOS控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆