[英]Customizing more in UITabBarController - “configure”
如何在UITabBarController中的“more”中為“Configure”修改UINavigationBarTintColor?
我在UITabBarController中有10個UINavigationController(一切都使用Interface builder。)
我可以使用Interface builder輕松設置所有UINavigationController的UINavigationBar的色調顏色。
同樣地,我還發現我們可以修改More的色調顏色如下。
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默認允許配置導航控制器的排列。
我的問題是“如何修改配置屏幕的色調?”。
哎呀! 我用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];
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.