Page 1 of 1

[Solved] [iOS] Dealing with status bar in iOS6/7

Posted: Sat Mar 08, 2014 2:48 pm
by simedj
The way the status bar behaves in iOS7 is quite different, it sits on top of the view you render to which means if you have GUI at the top of your app, it is overlapped in a nasty way.

This SO post discusses it in some depth but since Ogre creates its own view how should Ogre users respond to this? You can (I think) hide the status bar entirely which is what (I think) iPad does in iOS6 but otherwise if you want to support iOS6 and iOS7 it seems a bit tricky - you run the risk of having to do hacky things like add a 20px buffer to the top of your GUI, ugh.

Should Ogre itself address this in some way so that each developer doesn't have to hack this? Or if not, how would I hack this given that Ogre creates the View deep in the heart of GLES2 render-system?

Re: [iOS] Dealing with status bar in iOS6/7

Posted: Sat Mar 08, 2014 3:01 pm
by Wolfmanfx
You can provide a custom viewcontroller/view so ogre wiuld not create it.

Re: [iOS] Dealing with status bar in iOS6/7

Posted: Sat Mar 08, 2014 4:01 pm
by simedj
I could, but I'd rather not if possible - a big benefit of Ogre is I don't need to know how to create a HWND or a ViewController or other OS-specific stuff. You do that when you have atypical needs only.

Is the expectation is Ogre iApps would just hide the status bar and avoid the problem?

Re: [iOS] Dealing with status bar in iOS6/7

Posted: Sat Mar 08, 2014 11:38 pm
by masterfalcon
In your apps Info.plist just add this key:

UIViewControllerBasedStatusBarAppearance

And set it to NO. That should hide the status bar.

Re: [iOS] Dealing with status bar in iOS6/7

Posted: Tue Mar 11, 2014 2:25 am
by simedj
Problem solved - or at least averted :)