Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/98.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 仅在LandscapeRight中设置iPad发布。_Ios_Uiinterfaceorientation - Fatal编程技术网

Ios 仅在LandscapeRight中设置iPad发布。

Ios 仅在LandscapeRight中设置iPad发布。,ios,uiinterfaceorientation,Ios,Uiinterfaceorientation,这个问题与当前存在的问题不同 我已将设备设置为通用,并且只检查了景观 当我在iPhone上启动我的应用程序时,它只能像预期的那样在landscaperight中工作 但iPad可以旋转,不知道为什么。甚至试过 - (BOOL) shouldAutorotate { return YES; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscapeRight;

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

我已将设备设置为通用,并且只检查了景观

当我在iPhone上启动我的应用程序时,它只能像预期的那样在landscaperight中工作

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

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

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

在项目中打开
Info.plish
,查找“支持的界面方向”


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

谢谢,它可以工作。我不知道为什么有两排,但是谢谢。