开发者

Changing the tab bar title of the moreNavigationController from "More" to a custom

is there a way to change the title in the tabbar of the moreNavigationController? I开发者_运维百科t always shows "More". I tried it with setting the moreNavigationController.tabBarItem.title, unfortunately it seems to have to effect.

Sincerely, Heinrich


Sure there is:

Just do this:

self.tabBarController.moreNavigationController.navigationBar.topItem.title = @"Custom Title";


To change More controller's title, you have to set title property by directly accessing its first view controller in the navigation stack:

self.tabBarController.moreNavigationController.viewControllers[0].title = @"Custom Title";

I would not recommend changing navigation bar's topItem title directly, because this title will change when user navigates back and forth, and iOS will take title from corresponding controller's title property.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜