【问题标题】:Change UINavigationbar color for "More" tab?更改“更多”选项卡的 UINavigationbar 颜色?
【发布时间】:2010-11-09 23:17:42
【问题描述】:

我正在使用

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

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

谢谢。

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

【问题讨论】:

    标签: ios ios4 uinavigationbar tintcolor


    【解决方案1】:

    不要构建自定义工具栏,只需为您的 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 作为其自定义视图。

    【讨论】:

      【解决方案2】:

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

      【讨论】:

      • 其实可以的。刚刚找到这篇文章 (snaglz.wordpress.com/2010/08/27/…),您可以在其中使用 rootController.moreNavigationController.navigationBar.tintColor = [UIColor orangeColor];不过还是谢谢。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-30
      • 1970-01-01
      • 1970-01-01
      • 2010-09-20
      相关资源
      最近更新 更多