-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cocos2D needs to support all 'supportedInterfaceOrientations' options #891
Comments
Agreed. I am having this problem now. Also, I would like to add the request to set this parameter on a "Per-Scene" basis. I have a unique situation I am sure but some of the scenes work best in landscape and some in portrait. |
You could override the method easily enough without needing to change Cocos code. I'm a bit hesitant to add too many options or configurability to CCAppDelegate since it's purpose was to simplify the app delegate experience from 2.x. Using CCAppDelegate is optional, it's just meant to be a convenience that does what most people want with minimal fuss. As for per-scene transitions, you could override the supportedInterfaceOrientations and make it more dynamic. It would get much more tricky if you wanted to have transitions involved though. |
At the moment the methods are implemented inside of To me it seems that adding the additional options for the orientations would not add a lot of complexity to |
You are of course correct. Shoot. I remember thinking it was way easier than that. Does it make sense to expose this using more options for the setup dictionary? (Since we didn't use bitmasks... urk!) Should the navigation controller forward the method call to the app delegate so that it can be overridden? That would make more dynamic usages possible too. |
Yes, I was thinking of the second option and I think I prefer that one. It is also compatible with SpriteBuilder projects, because SpriteBuilder would otherwise override the setup .plist file. |
Currently the supported interface orientations are determined by the
CCNavigationController
insideCCAppDelegate
:The supported screen orientation is determined by the
screenOrientation
property ofCCNavigationController
which 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
supportedInterfaceOrientations
method.CCNavigationController
should expose all possible supported device orientations, either by adding more string constants or by another solution.The text was updated successfully, but these errors were encountered: