1

I have an app that I need to restrict one screen to be portrait only. I do this by always returning no in shouldAutoRotate. However, on iOS 8, when I rotate the device, it hides the status bar, but keeps the rest of the view locked to portrait.

In iOS 7, everything works fine. Nothing rotates when I rotate the device any which way.

I've tried disabling rotation system wide, and that works fine, so somehow, in iOS 8, the rotation separately checks for the views and then for the status bar to rotate (or maybe for the navigation controller, which includes the status bar? I'm not sure.)

Any help or ideas as to where to look to get my status bar to also lock to portrait in iOS 8 would be greatly appreciated!

Edit: So, it seems what is going on is that my VC is not rotating, its views are staying the same. However, the status bar orientation is changing from portrait to landscape. I'm figuring this out using NSLogs to check out the orientation, and even though shouldAutoRotate is returning NO no matter what, the status bar is still changing orientation.

Any ideas on how to stop the status bar from also rotating would be great!

Bill L
  • 2,576
  • 4
  • 28
  • 55
  • Perhaps the answers to this question - [How to force view controller orientation in iOS 8?][1] might be helpful! [1]: http://stackoverflow.com/questions/26357162/how-to-force-view-controller-orientation-in-ios-8 – Oscar Jul 20 '15 at 16:11
  • Hmmm, that gives me the same error, the status bar disappears. On further investigating, I think I've found that rotating the device doesn't change my views orientation, but does, in fact, change my status bar orientation. See edit above for more info. – Bill L Jul 20 '15 at 16:35

0 Answers0