I have a full screen game where objects spawn from the top of the screen (when holding it landscape, not portrait), however the notification center tab sometimes blocks the view. I believe you can't actually completely disable notification center, but is there a way to move the tab? So that way it appears on the left side of the screen when in landscape view?
I believe being able to move the status bar orientation could solve the issue, but I only know how to do that with obj-C, not anything Unity uses.
I'm trying to use the Obj-C code: "[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationPortrait;"
but I can't seem to find a good place to put it. I was going through the .mm files in XCode, but none of the locations I've tried seem to apply
Answer by KamiKaze425
Nov 30, 2012 at 12:56 AM
After testing a bunch of stuff, I finally figured it out. You need to disable Auto-rotation (which kind of sucks, but doesn't really affect gameplay)
Then in "IPhone_View.mm", in method orientTo, replace
[UIApplication sharedApplication].statusBarOrientation = ConvertToIosScreenOrientation(requestedOrient);
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO];
if you use something that puts the game temporarily in the background (like logging into facebook), an alternate, and probably more universal solution would be to add "[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO];" to the "AppController.mm" class under the method "applicationDidBecomeActive"
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
10 People are following this question.
iOS Screen Resolution bug when start in landscape
The name 'Joystick' does not denote a valid type ('not found')
iOS splash orientation flip bug
iOS orientation problem
Low memory crash on IOS when changing orientation