cocos2d 2.0.0 Interface Rotations
I was playing around with the alpha release of cocos2d 2.0.0 and got caught on trying to get the screen to rotate properly to landscape mode. After a bit of searching, I came upon the following line in the release notes:
[NEW] Director: Orientations are no longer supported. Only Portrait mode is supported. Use a ViewController to rotate the EAGL view.
What exactly does this mean? A little more digging found this post and the subsequent response which cleared it up for me.
How to configure your app's supported orientations in cocos2d 2.0.0:
If you're using the cocos2d templates in XCode, you'll want to open up RootViewController.m and look for the following:
Simply uncomment out one of the three lines by folliowing the comments, and your app will automatically only support those orientations. Simple as pie.
Stuck on any part of iOS, cocos2d, or general Objective-C development? Leave a note in the comments and I'll try to address any issues in future posts.
Rob Zimmerman