在UITabBarController中自定义更多 - “configure”

时间:2010-12-14 06:39:37

标签: iphone xcode uinavigationcontroller uitabbarcontroller uinavigationbar

如何在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默认允许配置导航控制器的排列。

我的问题是“如何修改配置屏幕的色调?”。

1 个答案:

答案 0 :(得分:10)

哎呀!我google了&我发现了一些东西我期待研究它。

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];
}