如何本地化标准 iOS 控件?

发布于 2024-12-27 07:19:22 字数 173 浏览 5 评论 0原文

我正在编写一个 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无敌元气妹 2025-01-03 07:19:22

您应该查看 UITableViewDelegate Protocol 中的以下方法:

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

请参阅 文档

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

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

See the docs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文