【问题标题】:Set iPad launch only in LandscapeRight.仅在 LandscapeRight 中设置 iPad 启动。
【发布时间】:2015-07-19 04:37:52
【问题描述】:

这个问题与当前存在的问题不同。

我已将设备设置为通用,并且只检查了横向权限。

当我在 iPhone 中启动我的应用程序时,它只能像预期的那样在横向模式下运行。

但是 iPad 可以旋转,不知道为什么。甚至尝试过

- (BOOL) shouldAutorotate
{
    return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscapeRight;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
    return UIInterfaceOrientationLandscapeRight;
}

【问题讨论】:

    标签: ios uiinterfaceorientation


    【解决方案1】:

    你可以试试这个方法。希望能帮到你

    在您的项目中打开Info.plish,找到`支持的界面方向。

    第一个是 iPhone 支持的界面方向,第二个是 iPad 支持的界面方向,你应该只留下一行(横向),如图所示。

    【讨论】:

    • 谢谢,它有效。我不知道为什么有两排,但是谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-23
    • 2011-12-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多