帖子地址 http://www.cocoachina.com/bbs/read.php?tid-14020.html
有时候你会发现使用Cocos2D运行的代码例子全是横屏显示的,如何纵向显示?
横屏都在Delegate中设置了类似下面这句,如果你要纵向去掉就可
[[Director sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft];
或者用以下方法
Director *director = [Director sharedDirector];
[director setLandscape:NO];//yes横屏 no竖
转载于:https://www.cnblogs.com/pengyingh/articles/2388904.html