改变navigationBar的颜色

目前就能改leftBarButtonItem,rightBarButtonItem一样的颜色,

打开plist文件加入 View controller-based status bar appearance,将value改为no,在设置你想改的颜色

self.navigationController.navigationBar.tintColor = [UIColor grayColor];

如果想两边不一样颜色,只能自己写个

UIImageView
_rightView = [[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH - 60, 8, 30, 30)];
 _rightView.userInteractionEnabled = YES;
[self.navigationController.navigationBar  insertSubview:_rightView  atIndex:1];
必须加上这个方法

- (void)viewWillDisappear:(BOOL)animated

{

    [_rightView removeFromSuperview];

}

原文地址:https://www.cnblogs.com/qianyindichang/p/4120882.html