开发者

How to change UITabBarController More button's title?

开发者 https://www.devze.com 2023-01-19 22:08 出处:网络
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 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?


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.

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>


I had the same problem - just go to your Info.plist file, and change the "Localization native development region" key to your language. The "more" button title changes automatically. This also auto-changes some other system button titles (eg the "edit" button in the icon order customization toolbar)


From the documentation:

"The title and image of system tab bar items cannot be changed."


Try this:

tabBarController.moreNavigationController.navigationBar.topItem.title = @"new title";

works for me

0

精彩评论

暂无评论...
验证码 换一张
取 消