更改“更多”的 UINavigationbar 颜色选项卡?

发布于 2024-10-01 19:57:59 字数 475 浏览 0 评论 0原文

我目前正在使用

self.navigationController.navigationBar.tintColor = [UIColor orangeColor];

更改 iOS 应用程序中 UINavigationBars 的颜色。然而,我的应用程序现在有如此多的选项卡栏项目,它使用苹果默认的“更多”控制器来管理额外的项目。不幸的是,我似乎无法弄清楚如何更改“更多”UINavigationBar 的颜色。有什么想法吗?

谢谢。

编辑:发现你可以做到这一点 - 请参阅 http:// /cduu.wordpress.com/2010/08/27/uinavigationbar-color-of-more-tab/ 了解更多。

I'm currently using

self.navigationController.navigationBar.tintColor = [UIColor orangeColor];

to change the color of my UINavigationBars in my iOS application. However my app now has so many tab bar items it uses Apple's default "More" controller to manage the extra items. Unfortunately, I can't seem to work out how to change the color of the "More" UINavigationBar. Any ideas?

Thanks.

EDIT: Found you can do it - see http://cduu.wordpress.com/2010/08/27/uinavigationbar-color-of-more-tab/
for more.

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

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

发布评论

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

评论(2

吃素的狼 2024-10-08 19:57:59

不要构建自定义工具栏,只需为 UIBarButtonItem 使用自定义视图。有关示例,请查看

http://developer.apple.com/library/ios/#samplecode/AddMusic/Listings/Classes_MainViewController_m.html%23//apple_ref/doc/uid/DTS40008845-Classes_MainViewController_m-DontLinkElementID_6

在该页面上,查看 -handle_NowPlayingItemChanged: 方法,它创建一个 UIBarButtonItem,并使用 UIButton 作为其自定义视图。

Don't build a custom toolbar, just use a custom view for your UIBarButtonItem. For an example of this, check out

http://developer.apple.com/library/ios/#samplecode/AddMusic/Listings/Classes_MainViewController_m.html%23//apple_ref/doc/uid/DTS40008845-Classes_MainViewController_m-DontLinkElementID_6

On that page, look in the -handle_NowPlayingItemChanged: method where it creates a UIBarButtonItem with a UIButton as its custom view.

三生池水覆流年 2024-10-08 19:57:59

这是不可能的。如果您想要这种控制,您可能想要构建一个自定义“工具栏”。

It cannot be done. you might want to build a custom "toolbar" if you want that kind of control.

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