Search code examples
iosios8statusbar

Status bar is disappearing on rotation


I'm pretty new to iOS, i've done all of Apples tutorial but something is bothering me a lot and I can't seem to find the right key words to solve this problem else I wouldn't ask such a simple question. Everyone else seems to want to hide the status bar but I want mine to remain persistent through all rotates.

Default orientation:

enter image description here

Any other orientation:

enter image description here

The status bar is disappearing! Could anyone point me in the right direction as to why? Thank you


Solution

  • I went into info.plist under supporting files, added a new item: "View controller-based status bar" and gave it the value YES

    I then went to my view controller .m file, and put in there

     - (BOOL)prefersStatusBarHidden
     {
         return NO;
      }