简体   繁体   English

在iPad上诊断旋转问题

[英]Diagnose rotation problems on iPad

I am having a weird problem with keeping orientation on the iPad. 在iPad上保持方向时,我遇到了一个奇怪的问题。 Very rarely, when I swap in and out view controllers, my view is displayed as portrait, even though my device is in landscape mode. 很少,当我换入和换出视图控制器时,即使我的设备处于横向模式,我的视图也显示为纵向。

What should I do to resolve this problem? 我应该怎么做才能解决这个问题? I have already set my controllers to landscape using shouldAutorotateToInterfaceOrientation: method. 我已经使用shouldAutorotateToInterfaceOrientation:方法将控制器设置为横向。 Also, it appears only very rarely, making tracking the bug very difficult. 此外,它很少出现,因此很难跟踪该错误。

Is there a faster way to find out why the orientation is wrong, besides going through each controller? 除了遍历每个控制器之外,还有没有一种更快的方法来找出为什么方向错误?

I see your comment that you are managing orientation by code using "shouldAutorotateToInterfaceOrientation", that is specifically an iOS5 method. 我看到您的评论,说您正在使用“ shouldAutorotateToInterfaceOrientation”(即iOS5方法)通过代码管理方向。 By any chance is the iPad iOS6? iPad iOS6有没有机会? If it is, you need to back it up with "supportedInterfaceOrientations". 如果是这样,则需要使用“ supportedInterfaceOrientations”进行备份。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM