``/**< 返回item颜色 */``
``[self.navigationController.navigationBarsetTintColor:[UIColorwhiteColor]];``
``/**< 导航栏背景 */``
``[self.navigationController.navigationBarsetBackgroundImage:[UIImageimageNamed:@"navigationImage.png"]forBarMetrics:UIBarMetricsDefault];``
``/**< 导航栏透明度 */``
``[self.navigationController.navigationBar.barStyle=UIBarStyleBlackTranslucent;[self.navigationController.navigationBarsetBackgroundImage:[UIImageimageNamed:@"o+x"] forBarMetrics:UIBarMetricsCompact];``
``/** < 不加会有横线*/``
``[self.navigationController.navigationBarsetValue:@(0)forKeyPath:@"backgroundView.alpha"]; self.navigationController.navigationBar.barStyle=UIBarStyleBlackTranslucent;``
``/**< 修改字体颜色及字体大小 */``
``[self.navigationController.navigationBar.titleTextAttributes=@{NSForegroundColorAttributeName:[UIColorwhiteColor],NSFontAttributeName:[UIFontboldSystemFontOfSize:17]};``
``// 设置导航栏透明``
``- (void)viewWillAppear:(BOOL)animated``
``{``
`` [super viewWillAppear:animated];``
`` [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];``
`` [self.navigationController.navigationBar setShadowImage:[UIImage new]];``
``}``
``- (void)viewWillDisappear:(BOOL)animated``
``{``
`` [super viewWillDisappear:animated];``
`` [self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];``
`` [self.navigationController.navigationBar setShadowImage:nil];``
``}``