您的位置:首页 > 其它

启动程序强制切换到横屏模式

2011-08-31 09:25 267 查看
启动IPhone应用程序,强制将屏幕从初始时的纵向切换到横评模式

在主UIViewController的源代码内,修改如下代码,参考代码如下所示:

// Override to allow orientations other than the default portrait orientation.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

{

  return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation ==                   UIInterfaceOrientationLandscapeRight);

}

THE END !
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: