I know this may be a pretty open ended question, but I am trying to set a different color to my navigation bar using this:
self.navigationController.navigationBar.tintColor = [UIColor greenColor];
And from some reason in one view controller I do get green color and in another one I am not getting the green color. I am calling this in viewdidLoad.
Is there something that could override that? (I am not overriding drawRect).
Happy to provide any code if necessary, but this really puzzels me.
Thanks!
Maybe you’re using a second
UINavigationControllerinstance in one of your view controllers?That could happen if you’re presenting a
UIViewControllermodally (UIViewControllermethodpresentModalViewController:animated:).If you’re presenting a
UIViewControllerthat’s not on the same “navigation stack” (managed by the originalUINavigationController), you would have to apply the same tintColor to itsUINavigationBar.