Why does the simulator always start in Landscape mode on Xcode4?

user306766 picture user306766 · Jun 30, 2011 · Viewed 7.1k times · Source

I just installed Xcode4 on my machine, setting up a new project.

When I run the simulator, the iphone always appears in Landscape mode. Anyone knows where I find the magic setting to run it in portrait so my head doesn't get twisted all the time?

thanks


EDIT:

It appears there must be sth in my code that makes the simulator hardware tip to landscape mode since before and after I test my app it is protrait again ... wierd ...

Not sure where I could have done sth like that to it since I use a new project (tab bar based) and only fiddle around the second VC ...

Also - when rotating the devide, the status bar and content do not change orientation ...

Answer

cldrr picture cldrr · Sep 6, 2011

I just had the same problem. But all supported interface orientations were selected in Project - Target - Summary - Supported Device Orientations.

But there is another reason why the simulator starts in landscape mode. The order of the 'Supported interface orientation' items of your project-info.plist file is also important. Check if the "Portrait (bottom home button)" is on the very first position in the list. If not, just move it up.

Supported interface orientations