1标题颜色:
(在默认显示的标题中直接修改文件的大小和颜色也是可以的)
[self.navigationController.navigationBar setTitleTextAttributes:
@{NSFontAttributeName:[UIFont systemFontOfSize:19],
NSForegroundColorAttributeName:[UIColor redColor]}];
2,
((UILabel *)self.navigationItem.titleView).textColor = [UIColor whiteColor];
3,
这是导航栏的问题,将下边的代码放在 viewWillAppear 方法中就可以实现效果:
- (void)viewWillAppear:(BOOL)animated{
// Called when the view is about to made visible. Default does nothing
[super viewWillAppear:animated];
//去除导航栏下方的横线
[navigationBar setBackgroundImage:[UIImage imageWithColor:[self colorFromHexRGB:@"33cccc"]]
forBarPosition:UIBarPositionAny
barMetrics:UIBarMetricsDefault];
[navigationBar setShadowImage:[UIImage new]];
}
原文:http://www.cnblogs.com/conan0919/p/5009873.html