iOS Question How do you change the supported orientations at runtime

Erel

Administrator
Staff member
Licensed User

JackKirk

Well-Known Member
Licensed User

JackKirk

Well-Known Member
Licensed User
What exactly are you trying to solve?
My app is basically all portrait.

Except when showing a video or a webpage where I want the user to have the ability to change the orientation by reorienting the phone.

And snap back to portrait when the user leaves the video or webpage.

This looks promising - I'm guessing you would have to have:

#iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
 

JackKirk

Well-Known Member
Licensed User
Erel,

Sorry but:
is not what I want to do - I want to give the user the ability (i.e. option) to rotate the view on certain pages - not automatically force a change of orientation.

This is what:
gives.

The only untidy part about the latter is that when you return to a portrait-only page you may be in landscape and lock yourself into it.

I have an idea that sort of solves this - I will write it up as a code snippet.
 
Top