如何在iPhone上启动后设置方向 [英] how to set Orientation after launch on iPhone

查看:202
本文介绍了如何在iPhone上启动后设置方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在发布后自动旋转iphone。

i Will like to know how to auto rotate iphone after launch.

我的发布图片是肖像,但应用程序本身处于风景中。

my launch image is in portraits but the app itself are in landscape.

发布后,方向仍然是肖像而不是自动旋转到横向。

after launch the orientation are still in portraits instead of auto rotate to landscape.

这是我的info.plist

this is my info.plist

在我的根视图控制器中

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

}


推荐答案

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

as shown in the image, set the marked value for landscape mode..

这篇关于如何在iPhone上启动后设置方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆