I have a project with a UINavigationController
as a root view controller. The deployment target is iOS 7 though I upgraded the project from iOS 6.
Now when I change the barStyle
of my UINavigationBar
to UIBarStyleBlack
my status bar becomes black. Just completely black, no content behind it. I also can't control the status bar style using preferredStatusBarStyle
or preferesStatusBarHidden
as I do in other projects.
I searched the whole project directory for "statusbar" – nothing. I threw out every pod that might manipulate the statusBar
– nothing. I compared my Info.plist
to the one of an iOS 7 control project where everything is find – nothing. What could it be?!
Also many other elements have a completly black background like UIAlertViews.
both problems have the same reason: External Screens.
the Black Background problem exists only in the Simulator. [UIColor clearColor] suddenly seems to become black. I did not find out why this happens or how to solve it.
The status bar problem manifests after connecting an external screen. I solved it by calling [appDelegate.window makeKeyAndVisible] after creating the window for the external screen again. The same seems to be necessary after the screen is disconnected.