在“更多”部分的编辑屏幕上更改导航栏颜色 [英] Changing the navigationbar color on the Edit screen of the More section
本文介绍了在“更多”部分的编辑屏幕上更改导航栏颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以通过以下方式更改更多navigationcontroller的navbar颜色:
I am able to change the navbar color of the More navigationcontroller via:
stTabBarController.moreNavigationController.navigationBar.tintColor = [UIColor colorWithRed:(102.0/255.0) green:(20.0/255.0) blue:(11.0/255.0) alpha:1];
但是当我单击编辑按钮时,会出现配置屏幕,导航栏颜色是默认蓝色。如何更改此颜色?
but when I click the Edit button, the Configure screen appears and the navbar color is the default blue. How can I change this color?
推荐答案
解决方法:
#pragma mark UITabBarControllerDelegate
- (void)tabBarController:(UITabBarController *)controller willBeginCustomizingViewControllers:(NSArray *)viewControllers {
UIView *editViews = [controller.view.subviews objectAtIndex:1];
UINavigationBar *editModalNavBar = [editViews.subviews objectAtIndex:0];
editModalNavBar.tintColor = [UIColor colorWithRed:(102.0/255.0) green:(20.0/255.0) blue:(11.0/255.0) alpha:1];
}
这篇关于在“更多”部分的编辑屏幕上更改导航栏颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文