Block orientation change?

Monkey Targets Forums/iOS/Block orientation change?

Grey Alien(Posted 2013) [#1]
Is there a way to prevent orientation change on iOS? So lock it to portrait.

My code actually supports it, and I'll use it on iPad but on iPhone I want to lock to portrait only. Is this a monkey thing or does it have to be done in XCode (like in the plist or something)? In which case I'm probably screwed as if it's to be a Universal app I doubt I can specify a locked orientation for iPhone only and both on iPad.


rIKmAN(Posted 2013) [#2]
You can set it in XCode, in your build settings just click the buttons to allow/disallow each orientation.

There are some options there for iPad/iPhone too, but not sure what they are as I have not needed to play with them yet, but the orientation buttons do work as I tested locking to landscape only (single/both ways) the other day.


Grey Alien(Posted 2013) [#3]
Great thanks! Looks like I can block landscape on phones but not iPad which is cool. [EDIT] This statement is a weird mistype, see below.


rIKmAN(Posted 2013) [#4]
That seems a bit silly, there must be a way to force orientation on the iPad as well?


Grey Alien(Posted 2013) [#5]
Oops sorry, I didn't mean to type that! You can set it on iPad separately from iPhone.