SetStatusBarOrientation causes problems in iOS8

I'm having problems with my iOS8 apps. I have created many OpenGL-based applications that do not need iOS to handle orientation. All this is handled in the OpenGL section. But I use setStatusBarOrientation to make sure that all dialogs / keyboards, etc. that appear, match everything else. I create my window and browse programmatically or in xib, I never needed to use a storyboard (in case is this relevant?)

Everything was fine until iOS 8 appeared.

Now it seems that setStatusBarOrientation is not behaving normally. This either does not change anything, or rotates β€œsomething” that stops touching the recording on half the screen. It is as if the window rotates inside itself, but visually nothing changes, only touches are performed.

It is difficult to explain and does not make sense.

But my question is: how do you set the status bar orientation in iOS8? And how do you do it without destroying everything else that works in previous versions of iOS?

+5
source share
2 answers

Install iOS7.1 as the base SDK, and it works great on iOS8, without all these weird bugs.

http://objcsharp.wordpress.com/2014/09/21/how-to-get-back-the-ios-7-sdk-after-upgrading-to-xcode-6/

0
source

found it

if ([UIViewController class]) // iOS8 has this class only { [[UIDevice currentDevice] setValue:[NSNumber numberWithInteger:UIDeviceOrientationPortrait] forKey:@"orientation"]; } 

found here: http://blog.lessfun.com/blog/2014/09/24/ios8-issue-keyboard-orientation-and-idletimerdisabled-not-working/

seems to work

-2
source

Source: https://habr.com/ru/post/1203249/


All Articles