如何更改更多选项卡项目的标题?

发布于 2024-09-28 10:04:18 字数 699 浏览 1 评论 0原文

我搜索了很多有关此主题的网站并尝试了一些解决方案:

1)更改导航项目标题

我更改了导航项目标题,但更多选项卡项目未更改。

2)更改 tabbarItem 标题

[tabBarController moreNavigationController].tabBarItem.title = @"Morre";

它也不起作用。

3)创建一个新的 tabbarItem 并分配给它:

 [tabBarController moreNavigationController].tabBarItem.= newlyCreatedTabBarItem;

我也没有工作。

还有一种替代方法可以像普通 tabBar 项目一样创建更多选项卡。但是,以这种方式配置 tabBar 项目变得不可能。我还需要更多选项卡中的“编辑”按钮。

我只设法更改了badgeValue,这对我来说没有任何价值:

 [tabBarController moreNavigationController].tabBarItem.badgeValue = @"100";

那么,有没有办法更改更多tabBar项目的标题?

I searched a lot of web-site about this topic and try some solutions:

1)Changing navigationItem title

I changed navigationItem title but More tabItem is not changed.

2)Changing tabbarItem title

[tabBarController moreNavigationController].tabBarItem.title = @"Morre";

It didnt work either.

3)Creating a new tabbarItem and assigning to it:

 [tabBarController moreNavigationController].tabBarItem.= newlyCreatedTabBarItem;

I didnt work too.

There is also an alternative way to create more tab like a normal tabBar item. However, in that way configuration of tabBar Items become impossible. I also need "Edit" button in more tab.

I only managed to change badgeValue which has no value for me:

 [tabBarController moreNavigationController].tabBarItem.badgeValue = @"100";

So,is there a way to change title of more tabBar Item?

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

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

发布评论

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

评论(2

南汐寒笙箫 2024-10-05 10:04:18

我想我知道你的意思...我知道你可以更改界面生成器中选项卡的名称,打开 mainwindow.xib,选择“选项卡栏控制器”,然后在选项卡栏控制器属性下,更改所需选项卡的标题。

I think I know what you mean... I know you can change the name of tabs in interface builder, open mainwindow.xib, select "Tab Bar Controller", and under Tab Bar Controller Attributes, change the Title of the tab you want.

农村范ル 2024-10-05 10:04:18

我唯一能做的就是更改控制器的标题,

 self.moreNavigationController.navigationBar.topItem?.title = self.moreNavigationController.navigationBar.topItem?.title?.uppercased()

但这似乎不会影响选项卡栏:/

The only thing I was able to manage doing was changing the title of the controller

 self.moreNavigationController.navigationBar.topItem?.title = self.moreNavigationController.navigationBar.topItem?.title?.uppercased()

but this does not seems to influence the tab bar :/

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