ios - how do you make an app ONLY support landscape? -


how make app support landscape? no portrait mode landscape throughout whole thing in xcode 3?

my naive answer add method in of root view controllers:

- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation  {     if (interfaceorientation==uiinterfaceorientationlandscapeleft || interfaceorientation==uiinterfaceorientationlandscaperight)         return yes;      return no; } 

this in game. of course, game has 1 view controller.

also, found helpful set "initial interface orientation" in app's info.plist landscape.


Comments

Popular posts from this blog

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -

Python __call__ special method practical example -