模拟器中的iOS 6自动旋转与实际的iOS 6设备不同

我的应用程序不会在iOS 6 GM模拟器中自动旋转,但它在设备上使用相同版本的iOS.这可能是一个模拟器错误吗?该应用程序正在使用已弃用的自动旋转方法,但它们在设备本身上工作正常,这让我想知道模拟器API是否不同?

解决方法

这是我为了让我的应用再次运行而添加的内容:
// Tell the system what we support
- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskAllButUpsideDown;
}

// Tell the system It should autorotate
- (BOOL) shouldAutorotate {
    return YES;
}

// Tell the system which initial orientation we want to have
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return UIInterfaceOrientationPortrait;
}

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...