UIButton *back = [UIButton buttonWithType:UIButtonTypeCustom];
back.titleLabel.font = [UIFont boldSystemFontOfSize:13];
[back setTitle:@"Back" forState:UIControlStateNormal];
[back setFrame:CGRectMake(5, 2, 52, 30)];
[back setBackgroundImage:[UIImage imageNamed:@"bar_return"] forState:UIControlStateNormal];
[back addTarget:self action:@selector(popDiyView) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *barButton = [[UIBarButtonItem alloc] initWithCustomView:back];
self.navigationItem.leftBarButtonItem = barButton;
修改导航栏背景 和导航栏标题颜色
[self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:46/255.0 green:46/255.0 blue:56/255.0 alpha:1.0]];
[self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,nil]];