Weird problem: After rotating my app to portrait, picking the toolbar item and exposing the uipopovercontroller, if I rotate back to landscape, the UINavigationController on the right side (objectAtIndex:0 of the SplitView) changes the color of the navigation bar. I am not sure why. I have it set in Interface Builder to be barStyle = UIBarStyleBlackOpaque;
It turns silver after it returns to landscape mode.
This only happens if I rotate it to portrait, create the popover, and select something in the navigation controller, which pushes another tableViewController. Even setting the properties in the viewDidLoad method does nothing.
Anyone have an idea?
viewDidLoad will only get called the first time your view is displayed (or if it's cleared due to memory issues). Try re-setting the barStyle in your viewWillAppear, or even – splitViewController:willShowViewController:invalidatingBarButtonItem:.
I'm having this same problem but resetting the barStyle in viewWillAppear causes another problem. Setting it there also sets it when it is shown in the popover, so it no longer matches the popover color. How can I set the barStyle to what I want only when it is being shown in the left pane of the split view controller? I guess I could set it in view will appear only when the orientation is landscape but that seems dirty. Also, setting it in splitViewController:willShowViewController:invalidatingBarButtonItem: does not work at all since I think this is called before the split view controller sets the styles back to default. This seems like a really stupid bug on apple's part. It should be changing it back to the style it originally was, not the default one.
@Brendan G. Lim and any others having trouble with the tintColor, finally got it working with a custom navigation bar:
Open MainWindow.xib, and select your navigation bar you want to set the color to. In your Identity pane [Apple][4] select CustomNavigationBar as the class.
In the attributes pane [Apple][1] set the color of the bar.
That's it!