iOS9:替代UIDevice.currentDevice()。setValue(...)强制方向 [英] iOS9: Alternative to UIDevice.currentDevice().setValue(...) to force orientation
问题描述
在我看来,这在iOS9中不再起作用了。这是基于我的SO研究迫使方向改变的事实上的方式。它现在冻结了我的SpriteKit游戏。
It seems to me this does not work anymore in iOS9. It was the de facto way of forcing orientation changes based my SO research. It now freezes my SpriteKit game.
它只是我,如果没有,有没有人知道其他选择?
Is it just me, and if not does anyone know of an alternative?
编辑:Portrait和UpsideDown仍然有效。似乎只有横向模式现在导致冻结
EDIT: Portrait and UpsideDown still work. It seems only Landscape modes now cause a freeze
编辑2:实际上我认为你可以去肖像< - > UpsideDown和LandscapeLeft< ; - > LandscapeRight,但不在它们之间
EDIT 2: Actually I think you can go Portrait <--> UpsideDown and LandscapeLeft <--> LandscapeRight, but not in between them
推荐答案
添加到Alex的答案:我的经验是Apple只阻止了这个方向更改为不需要全屏的iOS9 iPad。因此,如果您告诉应用程序需要全屏,则轮换应该有效:
Adding to Alex's answer: My experience is that Apple only blocks the orientation change for iOS9 iPads that don't require fullscreen. So if you tell the app to require fullscreen, the rotation should work:
但是,我不知道它是否会解决你的SpriteKit冻结,因为根据我的经验,iOS9也引入了大量的SpriteKit错误。
However, I have no clue whether it'll solve your SpriteKit freeze since in my experience iOS9 also introduced plenty of SpriteKit bugs.
这篇关于iOS9:替代UIDevice.currentDevice()。setValue(...)强制方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!