Currently the supported interface orientations are determined by the CCNavigationController inside CCAppDelegate:
-(NSUInteger)supportedInterfaceOrientations
{
if ([_screenOrientation isEqual:CCScreenOrientationAll])
{
return UIInterfaceOrientationMaskAll;
}
else if ([_screenOrientation isEqual:CCScreenOrientationPortrait])
{
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}
else
{
return UIInterfaceOrientationMaskLandscape;
}
}
The supported screen orientation is determined by the screenOrientation property of CCNavigationController which only has three valid values:
NSString* const CCScreenOrientationLandscape = @"CCScreenOrientationLandscape";
NSString* const CCScreenOrientationPortrait = @"CCScreenOrientationPortrait";
NSString* const CCScreenOrientationAll = @"CCScreenOrientationAll"
If games want to restrict the supported device orientation to only one orientation (e.g. LandscapeLeft) the Cocos2D source code needs to be modified to change the implementation of the supportedInterfaceOrientations method.
CCNavigationController should expose all possible supported device orientations, either by adding more string constants or by another solution.
Currently the supported interface orientations are determined by the
CCNavigationControllerinsideCCAppDelegate:The supported screen orientation is determined by the
screenOrientationproperty ofCCNavigationControllerwhich only has three valid values:If games want to restrict the supported device orientation to only one orientation (e.g. LandscapeLeft) the Cocos2D source code needs to be modified to change the implementation of the
supportedInterfaceOrientationsmethod.CCNavigationControllershould expose all possible supported device orientations, either by adding more string constants or by another solution.