问题
I have my iPad application in landscape mode sitting at my desk. When the iPad's screen locks, I unlock the screen. When the application is shown again, the application is in portrait mode and will remain so until I pick up my iPad and move it around to reset the orientation.
Is there some sort of check that I should make to leave it in the orientation that it is in when the view appears?
回答1:
You can try checking [[UIApplication sharedApplication] statusBarOrientation]
and then setting the correct orientation from there.
来源:https://stackoverflow.com/questions/4755051/ipad-application-comes-up-in-portrait-orientation-after-screen-unlock-regardless