I would like to make an iPhone app supporting Portrait & PortraitUpsideDown using cocos2d-iPhone 1.0. Is it possible for cocos2d-iPhone to auto-rotate?
I would like to make an iPhone app supporting Portrait & PortraitUpsideDown using cocos2d-iPhone
Share
Yes.
Do you also want to know how? Open the GameConfig.h in a newly created Cocos2D project and make sure autorotation is enabled and set to use the UIViewController. Then edit the RootViewController to return the interface orientations supported by your device.
On the other hand, and I don’t get tired of saying this, you could just use Kobold2D. There you can edit these settings in the config.lua file:
That sets the default orientation to portrait, allows autorotation using the UIViewController and restricts rotation to the two Portrait orientations. That’s it.