在 iPad 上以横向模式启动后,iphone 应用程序没有响应 [英] iphone app doesn't respond after starting in landscape orientation on iPad

查看:20
本文介绍了在 iPad 上以横向模式启动后,iphone 应用程序没有响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 iPhone 应用在 iPad 上以横向模式启动时没有响应.

My iPhone app doesn't respond when launched on an iPad in landscape mode.

如果它以纵向模式启动,一切正常.在横向模式下,在旋转应用或按下 1x 2x 按钮之前什么都不起作用.

If it launches in portrait mode everything works fine. In landscape orientation nothing works until the app is rotated or the 1x 2x button is pressed.

我已经尝试使用断点调试应用程序并逐步执行代码,但它显示应用程序在调试控制台中正常运行.

I've tried debugging the app with breakpoints and stepping through the code but it shows that the app is running normally in the debug console.

推荐答案

我发现这是 iOS 6 设备独有的,但是如果您删除应用程序 plist 中支持的界面方向"下的所有条目,则会出现此问题消失了.或者,如果您在目标设置的摘要屏幕上为状态栏"设置选中在应用程序启动期间隐藏"选项,这也会修复它:

I have found that this is unique to iOS 6 devices, but if you remove all of the entries under "Supported interface orientation" in the app's plist, this problem goes away. Or if you check the "Hide during application launch" option for the "Status Bar" settings on the Summary screen of the Target settings, this also fixes it:

我认为这两个选项中的任何一个都应该修复这个错误,这没有合乎逻辑的理由,但它们都可以.

There's no logical reason that I can see that either of these options should fix this bug, but they both do.

如果您使用 iOS 6 中支持的方向设置,您仍然可以通过 supportedInterfaceOrientations(或在 iOS 5 中,您仍然可以使用shouldAutorotateToInterfaceOrientation: 方法).

If you play around with the supported orientation settings in iOS 6, you can still programmatically control the permitted interface orientations via supportedInterfaceOrientations (or in iOS 5, you can still use theshouldAutorotateToInterfaceOrientation: method).

这篇关于在 iPad 上以横向模式启动后,iphone 应用程序没有响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆