如何在UITabBarController中的“more”中为“Configure”修改UINavigationBarTintColor?
我在UITabBarController中有10个UINavigationController(一切都使用Interface builder。)
我可以使用Interface builder轻松设置所有UINavigationController的UINavigationBar的色调。
同样我也发现我们可以修改 更多 的色调颜色,如下所示。
tBarDashboard.moreNavigationController.navigationBar.tintColor=
[UIColor colorWithRed:30/255.0 green:103/255.0 blue:7/255.0 alpha:1.0];
// here tbarDashboard is my UITabBarController.
但是如果我们在tabbarcontroller中有太多导航控制器,那么TabBarController默认允许配置导航控制器的排列。
我的问题是“如何修改配置屏幕的色调?”。
答案 0 :(得分:10)
http://sugartin.info/2012/01/23/uitabbarcontroller-more-configure-customization/
哟!哟!我懂了。- (void)tabBarController:(UITabBarController *)controller willBeginCustomizingViewControllers:(NSArray *)viewControllers {
UIView *editView = [controller.view.subviews objectAtIndex:1];
UINavigationBar *modalNavBar = [editView.subviews objectAtIndex:0];
modalNavBar.tintColor = [UIColor orangeColor];
}