0

我有一个 iphone 应用程序,我想仅在横向模式下以模态方式呈现其中一个视图,并将代码设置在其视图控制器下方。在 iphone(其预期平台)上一切正常,但在 iPad 上运行进行演示时,横向视图的左侧边缘被截断约 10 像素。即看起来显示器对于屏幕来说太宽了。没有其他视图受到影响,并且在 1x 或 2x 缩放时会发生同样的事情。

这是一个错误还是我错过了什么?

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
4

1 回答 1

0

InterfaceOrientation 可以返回“unknown”值,在这些情况下你会遇到 iPad 认为它被旋转并且你的代码会返回错误结果的情况

于 2010-08-27T23:32:41.943 回答