colors dont show up on UINavigationBar
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 anot开发者_Go百科her 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 UINavigationController
instance in one of your view controllers?
That could happen if you're presenting a UIViewController
modally (UIViewController
method presentModalViewController:animated:
).
If you're presenting a UIViewController
that's not on the same "navigation stack" (managed by the original UINavigationController
), you would have to apply the same tintColor to its UINavigationBar
.
精彩评论