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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -