``/**< 返回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];``
``}``