Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS9: Alternative to UIDevice.currentDevice().setValue(...) to force orientation

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?

EDIT: Portrait and UpsideDown still work. It seems only Landscape modes now cause a freeze

EDIT 2: Actually I think you can go Portrait <--> UpsideDown and LandscapeLeft <--> LandscapeRight, but not in between them

like image 307
Jamona Mican Avatar asked Sep 20 '15 22:09

Jamona Mican


1 Answers

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:

enter image description here

However, I have no clue whether it'll solve your SpriteKit freeze since in my experience iOS9 also introduced plenty of SpriteKit bugs.

like image 73
andrrs Avatar answered Oct 04 '22 20:10

andrrs