Ios 仅在LandscapeRight中设置iPad发布。
这个问题与当前存在的问题不同 我已将设备设置为通用,并且只检查了景观 当我在iPhone上启动我的应用程序时,它只能像预期的那样在landscaperight中工作 但iPad可以旋转,不知道为什么。甚至试过Ios 仅在LandscapeRight中设置iPad发布。,ios,uiinterfaceorientation,Ios,Uiinterfaceorientation,这个问题与当前存在的问题不同 我已将设备设置为通用,并且只检查了景观 当我在iPhone上启动我的应用程序时,它只能像预期的那样在landscaperight中工作 但iPad可以旋转,不知道为什么。甚至试过 - (BOOL) shouldAutorotate { return YES; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscapeRight;
- (BOOL) shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeRight;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeRight;
}
你可以试试这个方法。希望这能帮到你 在项目中打开
Info.plish
,查找“支持的界面方向”
第一个是iPhone支持的界面方向,第二个是iPad支持的界面方向,您应该只留下一行(横向),如图所示。谢谢,它可以工作。我不知道为什么有两排,但是谢谢。