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);
}