如何在iPhone上启动后设置方向

我会想知道如何在启动后自动旋转iphone。

我的发布图像是在肖像,但应用程序本身在风景。

发射后的方向仍然在人像,而不是自动旋转到风景。

这是我的info.plist

在这里输入图像说明

在我的根视图控制器

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight)); } 

在这里输入图像说明

如图所示,设置横向模式的标记值。

在iphone启动图像始终处于肖像模式,您可以使启动图像,使其看起来像它在横向,但实际上是在肖像模式

虽然ipad有模式风景和肖像启动图像的选项