在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 ( UIInterfaceOrientationIsPortrait( interfaceOrientation ) );

本文介绍如何在iOS应用中通过修改RootViewController.m文件实现界面横纵屏切换。提供了横屏和纵屏模式下的具体实现代码。

7267

被折叠的 条评论
为什么被折叠?



