3 ms·
In addition, there's a Info.plist key/value, UIInterfaceOrientation with the value UIInterfaceOrientationLandscapeRight or UIInterfaceOrientationLandscapeLeft,
by ROFISH 17y ago
In addition, there's a Info.plist key/value, UIInterfaceOrientation with the value UIInterfaceOrientationLandscapeRight or UIInterfaceOrientationLandscapeLeft, that lets you set the default rotation level and the simulator will start the app in the correct rotation.
EDIT: Also the autorotation only works on ViewControllers. If you only have Views without ViewControllers, (such as the default OpenGL app from the wizard) they will not rotate.
- InkweaverReview 17y agoWould I have to set up two views within Interface Builder, one for landscape and one for portrait, or do I use the one single view and rotate it using code?
- allenbrunson 17y agoyou just use one view. implement that view controller method i mentioned, and always return TRUE. you must do this for every view in your app, if you want them to all work in landscape modes. that's all you have to do, as far as the iphone is concerned. of course you'll have to draw the view contents differently, when you're in landscape mode.