Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Window with UIWindowLevelStatusBar + 1 hides status bar on iOS 8

I have been adding a console window on top of the status bar:

enter image description here

This has been working great by setting its windowLevel to UIWindowLevelStatusBar + 1 up to iOS 7.x (screenshot).

On iOS 8 the same code makes the status bar disappear and offsets navigation bars up. I tried several different window levels with no luck.

I use the library on many projects and noticed that the status bar does show up when a "PopUpWindow" of level UIWindowLevelAlert is also shown. So one possible solution would be to add a mock window there but that would be plain dirty.

like image 526
Rivera Avatar asked Oct 02 '14 02:10

Rivera


1 Answers

Try implementing the -prefersStatusBarHidden method on the root view controller of your UIWindow. Worked for me.

like image 92
Ricky Avatar answered Oct 23 '22 02:10

Ricky