ios - Adding UIViewController messes up screen orientation -


i started glsprite sample app (source code), added uiviewcontroller adding

uiviewcontroller *vc = [[uiviewcontroller alloc] init]; vc.view = glview; self.window.rootviewcontroller = vc; [window makekeyandvisible]; 

to end of glspriteappdelegate::applicationdidfinishlaunching. controller seems working can pop gamecenter windows, has messed screen orientation. app fine in portrait, in other rotations incorrectly has white bars on side, 1 of views rotated 90 degrees.

i doing [[uiapplication sharedapplication] setstatusbarorientation:uiinterfaceorientationlandscaperight]; in eaglview::initwithcoder, tried moving end of applicationdidfinishlaunching had same behavior.

can help? can fix or debug this? thank you!

the issue new uiviewcontroller rotating, when game expects portrait screen. fix created custom viewcontroller , implemented

- (bool)shouldautorotate {     return no; }  - (nsuinteger)supportedinterfaceorientations {     return 0; } 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -