Cocos2D横竖屏设置[二]
打开 RootViewController.m ,然后所有搜索如下代码: Ios代码 #elif GAME_AUTOROTATION == kGameAutorotationUIViewController // // EAGLView will be rotated by the UIViewController // // Sample: Autorotate only in landscpe mode // // return YES for the supported orientations return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) ); 将最后return的修改成如下代码即可竖屏: Ios代码 return ( UIInterfaceOrientationIsPortrait( interfaceOrientation ) );