如何更改UITabBarController更多按钮的标题? [英] How to change UITabBarController More button's title?

查看:73
本文介绍了如何更改UITabBarController更多按钮的标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Tab Bar应用程序。该应用程序有8个UITabBarItems,并且会自动添加 More 按钮。我想将标题从更多更改为其他内容。

I have a Tab Bar app. The app has 8 UITabBarItems and the More button is added automatically. I want to change the title from More to something else.

我已经尝试过以下内容:

I have already tried the following:

tabbarController.moreNavigationController.tabBarItem.title=@"Test";

但它仍显示更多。没错。没有变化。

But it still displays "More". No error. No changes.

如何将更多文本更改为另一个?

How can I change the "More" text to another?

推荐答案

更多按钮下的标签是根据用户在其设置中指定的当前区域设置进行本地化的。但是,您必须在应用的Info.plist中声明对该语言环境的支持。

The label under the "More" button is localized for you based on the user's current Locale as specified in their Settings. However, you have to declare your support for that locale in your app's Info.plist.

添加 CFBundleLocalizations 键到应用程序的Info.plist并将其值设置为一个数组,其值是您希望应用程序自动本地化系统标签的语言环境。例如,如果要对英语和日语进行本地化,则可以将以下条目添加到Info.plist中:

Add the CFBundleLocalizations key to your application's Info.plist and set its value to an array whose values are the locales for which you want the app to automatically localize system labels. For example, if you want to localize for both English and Japanese, you would add the following entry to the Info.plist:

<key>CFBundleLocalizations</key>
<array>
    <string>en</string>
    <string>ja</string>
</array>

这篇关于如何更改UITabBarController更多按钮的标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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