setting proper cocos2d orientation -
in cocos2d application, inside applicationdidfinishlaunching method app delegate, set orientation via [director setdeviceorientation:kccdeviceorientationportrait] because want portrait. however, apple rejected app saying must support upside down portrait well.
i'm not how detect this, though. reading currentdevice orientation seems return unknown orientation, questions twofold:
1) how supposed detect orientation can set either portrait or upsidedown portrait (where stay good).
2) suspect i'll have issue splash screen because it's loaded before reach point in delegate. how can detect orientation can set right splash screen?
i can edit codes fix first question.. hope using .99.5..
in rootviewcontroller.h, in function
-(bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation
look line:
#elif game_autorotation == kgameautorotationuiviewcontroller { return ( uiinterfaceorientationislandscape( interfaceorientation ) ); }
change to
return ( uiinterfaceorientationisportrait( interfaceorientation ) );
Comments
Post a Comment