1.导航栏背景色设置:
//设置为半透明
self.navigationController.navigationBar.translucent = YES;
//设置背景色及透明度
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0.75]] forBarMetrics:UIBarMetricsDefault];
2.导航栏标题颜色:
[self.navigationController.navigationBar setTintColor:[UIColorwhiteColor]];
UIImage *backImage = [UIImage imageNamed:@"route_tab_back"];
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[backBtn setImage:backImage forState:UIControlStateNormal];
backBtn.frame = CGRectMake(0, 0, backImage.size.width, backImage.size.height);
[backBtn addTarget:self action:@selector(handleBackButton) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationController.navigationItem.leftBarButtonItem = item;