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 ) );
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章