Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPad SplitView changes main navigation bar color

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?

like image 401
Daddy Avatar asked Dec 03 '22 12:12

Daddy


1 Answers

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:.

like image 81
Ben Gottlieb Avatar answered Dec 18 '22 16:12

Ben Gottlieb