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
Post a Comment