【问题标题】:Customizing more in UITabBarController - "configure"在 UITabBarController 中自定义更多 - “配置”
【发布时间】:2011-05-25 02:34:54
【问题描述】:

如何修改UITabBarController“more”中“Configure”的UINavigationBarTintColor?

我在一个 UITabBarController 中有 10 个 UINavigationController(一切都使用 Interface builder。)

我可以使用 Interface builder 轻松设置所有 UINavigationController 的 UINavigationBar 的色调颜色。

同样我也发现我们可以修改More的Tint颜色如下。

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

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

【问题讨论】:

    标签: iphone xcode uinavigationcontroller uitabbarcontroller uinavigationbar


    【解决方案1】:

    哎呀!我用谷歌搜索并发现了一些东西。我期待着研究它。

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

    【讨论】:

    • 正是我需要的!谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多