Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
261 views
in Technique[技术] by (71.8m points)

ios - 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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...