使用Xcode 6(iOS 8 SDK)构建项目会导致iPad上出现横向旋转渲染问题 [英] Building project with Xcode 6 (iOS 8 SDK) causes landscape rotation rendering issue on iPad

查看:126
本文介绍了使用Xcode 6(iOS 8 SDK)构建项目会导致iPad上出现横向旋转渲染问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个项目在使用Xcode 5.1.1(iOS sdk 7.2)构建时表现得很好,但是当使用Xcode 6.2(iOS sdk 8.2)构建时,iPad上会出现旋转渲染问题。在iPad上,我们的应用程序仅支持横向左侧和右侧景观。当您从一个旋转到另一个时,在旋转动画中,屏幕从上到下旋转到右侧,但是当它执行此操作时,它会落在错误的位置。 (屏幕的左下角从底部向上约200像素,从左侧开始插入相同数量的像素。)

We have a project that behaves as desired when built using Xcode 5.1.1 (iOS sdk 7.2), but when build using Xcode 6.2 (iOS sdk 8.2) there is a rotation rendering issue on the iPad. On the iPad our app only supports landscape left and landscape right. When you rotate from one to the other, on the rotation animation the screen rotates from upside down to right side up, but when it does this it lands in the wrong position. (The bottom-left corner of the screen ends up approximately 200 pixels up from the bottom and an equal number of pixels inset from the left.)

这也可能发生在iPhone,但在iPhone上我们只支持肖像,所以旋转不是问题。

This may also happen on iPhone, but on iPhone we only support portrait so rotation isn't an issue.

如果我使用Xcode 6构建但在iPad上运行,则需要另外一条信息iOS 7没有问题。这只发生在我使用Xcode 6构建并在iOS 7上运行的iPad上。

One additional piece of info, if I build with Xcode 6 but run on an iPad with iOS 7 there is NO issue. This ONLY happens when I build with Xcode 6 and run on an iPad with iOS 7.

有没有其他人看到过行为并知道根本原因是什么?

Has anyone else seen then behaviour and know what the root cause may be?

我发现另一个关于堆栈溢出的问题,其他人有完全相同的问题。他们的屏幕截图显示旋转中的EXACT渲染错位与我正在处理的应用程序一样。这是另一个问题的链接。 (令人沮丧的是,似乎没有人回答这个问题,并且没有一个建议给我一个解决方案。)

I found another Question on stack overflow where someone else has the EXACT same problem. Their screenshots show the EXACT rendering misplacement on the rotate as the app I'm working on. Here is a link to that other question. (Frustratingly, it appears no one has answered the question, and none of the suggestions have given me a solution.)

以下是显示其他问题的链接和我一样的错误:
这是一个iOS 8 Bug(轮换方向问题)?

Here is the link to the other questions that shows the same bug as me: Is this an iOS 8 Bug (orientation issue on rotation)?

推荐答案

我找到了问题的答案。当我试图点击屏幕的最右侧时,我们的其他开发人员注意到主窗口中的意外零。这导致我做了一个新的搜索,我发现stackoverflow上的这个线程实际上包含了我们问题的答案。

I found the answer to my problem. One of our other developers noticed an "unexpected nil in main window" when attempting to tap on the far right of the screen. This led me to do a new search and I found this thread on stackoverflow that actually contained the answer to our problem.

(这是帮助我的问题的链接回答: _UIApplicationHandleEventFromQueueEvent中的意外nil窗口

( here is the link to the question which help my answer: unexpected nil window in _UIApplicationHandleEventFromQueueEvent )

实际答案来自frankish,他建议打开main.xib(或主要故事板)并单击其中的Window并确保选中Launch at launch和Full screen at Launch属性(设置为true。)

The actual answer came from frankish who suggested opening the main.xib (or main storyboard) and clicking on the Window in that and making sure that the "Visible at Launch" and "Full screen at Launch" properties are checked (set to true.)

在我们的例子中,它只是需要设置的启动时全屏属性,但设置这个固定旋转问题我们正在看到它解决了一个问题,即在屏幕最右侧的iPad上播放时无法触摸。

In our case, it was JUST the "Full screen at Launch" property that needed to be set, but setting this fixed the rotation problem we were seeing AND it fixed an issue where when launching on iPad in landscape the far right of the screen was not touchable.

这篇关于使用Xcode 6(iOS 8 SDK)构建项目会导致iPad上出现横向旋转渲染问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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