//写在当前控制器中 //导航栏中间标题 self.title = @"新闻"; //设置导航栏背景图片 [self.navigationController.navigationBar setBackgroundImage: [UIImage imageNamed:@"bg_nav_back_nomar"] forBarMetrics:UIBarMetricsDefault]; //设置导航栏背景颜色 self.navigationController.navigationBar.barTintColor = [UIColor redColor]; //状态栏颜色 为白色 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; //导航栏 中间显示图片 self.navigationItem.titleView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"navigationHeaderTitle"]]; //自定义导航栏返回 按钮 - (void)addbackButton{ UIButton *backButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)]; [backButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; [backButton setImage:[UIImage imageNamed:@"navigationBackBtn"] forState:UIControlStateNormal]; backButton.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 34); self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton]; } - (void)back{ [self.navigationController popViewControllerAnimated:YES]; }