I have the following code in my viewDidLoad of my containing view:
// Now add the next button
UIBarButtonItem *nextButton = [[UIBarButtonItem alloc] initWithTitle:@"Next" style:UIBarButtonItemStylePlain target:self action:@selector(self)];
self.navigationItem.rightBarButtonItem.tintColor = [UIColor blueColor];
self.navigationItem.rightBarButtonItem = nextButton;
The UINavigationController parent has this in viewDidLoad:
[super viewDidLoad];
// Do any additional setup after loading the view.
self.navigationBar.tintColor = [UIColor whiteColor];
self.navigationBar.barTintColor = [UIColor blackColor];
How do I just customize the rightBar button to change the background color and maybe the text color?
You have to set the tintColor property on the button after you assign the button.
self.navigationItem.rightBarButtonItem = nextButton;
self.navigationItem.rightBarButtonItem.tintColor = [UIColor blueColor];
instead of
self.navigationItem.rightBarButtonItem.tintColor = [UIColor blueColor];
self.navigationItem.rightBarButtonItem = nextButton;