Cocos2D横竖屏设置

打开  RootViewController.m ,然后所有搜索如下代码:

#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的修改成如下代码即可竖屏:
return ( UIInterfaceOrientationIsPortrait( interfaceOrientation ) );

你可能感兴趣的:(cocos2d)