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

启动IPhone应用程序,强制将屏幕从初始时的纵向切换到横评模式

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

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

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

{

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

}

THE END !

原文地址:https://www.cnblogs.com/xingchen/p/2160304.html