Objective c 启动应用程序并保持横向模式

Objective c 启动应用程序并保持横向模式,objective-c,ios,cocoa-touch,landscape,uiinterfaceorientation,Objective C,Ios,Cocoa Touch,Landscape,Uiinterfaceorientation,如何在横向模式下启动应用程序,并保持屏幕旋转?实现视图控制器的应自动旋转指针界面方向:方法和返回UIInterfaceOrientationIsLandscape(方向) 同时将Info.plist键UIInterfaceOrientation和UISupportedInterfaceOrientation设置为UIInterfaceOrientation和scapeLeft和UIInterfaceOrientation和scapeRightUIInterfaceOrientation将采用单个

如何在横向模式下启动应用程序,并保持屏幕旋转?

实现视图控制器的
应自动旋转指针界面方向:
方法和
返回UIInterfaceOrientationIsLandscape(方向)

同时将
Info.plist
UIInterfaceOrientation
UISupportedInterfaceOrientation
设置为
UIInterfaceOrientation和scapeLeft
UIInterfaceOrientation和scapeRight
UIInterfaceOrientation
将采用单个值,因此将其中一个值分配给
UISupportedInterfaceOrientation
,并将两个值分配给
UISupportedInterfaceOrientations

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
 return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || 
   interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}