代码之家  ›  专栏  ›  技术社区  ›  runmad

是否更改“更多”选项卡的导航栏颜色?

  •  4
  • runmad  · 技术社区  · 16 年前

    当TabbarController中的视图控制器超过5个时,将自动为您设置“更多”视图。是否可以更改此视图中导航栏的颜色以匹配我正在使用的颜色,而不是默认的蓝色?

    4 回复  |  直到 13 年前
        1
  •  10
  •   Ben Scheirman    15 年前

    好啊。我不应该完全信任这些文件。几分钟后我试着找到了答案。docs列出moreNavigationController是只读属性。但这对我来说很好:

    tabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
    

    或

    tabBarController.moreNavigationController.navigationBar.tintColor = [UIColor redColor];
    

    以防有人想知道。

        2
  •  1
  •   Tim    16 年前

    我只知道这是可行的:

    yournavigationController.navigationBar.tintColor = [UIColor blueColor];
    

    但我不知道它是否因此而起作用。

        3
  •  1
  •   atxe AlianaWolf    14 年前

    在您的应用程序中 UIApplicationDelegate 提出:

    self.tabBarController.moreNavigationController.navigationBar.tintColor = [UIColor blackcolor];
    
        4
  •  0
  •   DD_ NiravPatel    13 年前

    放

    tabBarController.moreNavigationController.navigationBar.tintColor = [UIColor colorWithRed:64/256.0 green:191/256.0 blue:23/256.0 alpha:1.0];
    

    在我的主应用程序中,代表工作了

    推荐文章