我设置了几个选项卡,并且它们足够多,需要更多的选项卡。

更多标签;但是,导航栏的颜色似乎与其他选项卡的颜色不同。

从其他搜索中发现的唯一方法是通过编写以下内容:

UINavigationController* moreBar = self.tabBarControlelrVC.moreNavigationController;
moreBar.navigationBar.barStyle = UIBarStyleBlack;


我把它放在我的appDelegate的viewDidLoad中;但无济于事...

有人对此有任何好的帖子或想法吗?
谢谢。

最佳答案

您需要这样设置:

在didFinishLaunchingWithOptions中:

tabBarController = (UITabBarController *) self.window.rootViewController;

 // Set the color of the navigationbar in moretab
 UINavigationController *moreBar = tabBarController.moreNavigationController;
 moreBar.navigationBar.barStyle = UIBarStyleBlack;


或其他属性...

 moreBar.navigationBar.tintColor = [UIColor orangeColor];
 moreBar.navigationBar.hidden = NO;
 moreBar.navigationBar.backgroundColor = [UIColor blackColor];

10-07 14:53