ios - Default app orientation -


i have app written in older version of xcode. right i'm using xcode 4.6.1. app inherited developer developed outside company.

one of problems app interface. should default landscapeleft (this value set in plist file). app ignores directive , instead defaults portrait mode.

is there need force code honor value? i'm relatively new ios/objective-c. code compiles , runs, it's interface isn't doing want.

it's little easier since ipad app.

edit i've tried adding following code 1 of problematic viewcontrollers, it's not being honored. thoughts on how force view landscape? (is there setting in ide - looks xcode used have orientation attribute, can't find in 4.6.1)

- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation {     // overriden allow orientation.     return ((interfaceorientation==uiinterfaceorientationmasklandscapeleft) || (interfaceorientation == uiinterfaceorientationmasklandscaperight)); }  - (nsuinteger) supportedinterfaceorientations {     return uiinterfaceorientationmasklandscapeleft; }  - (nsinteger) supportedinterfaceorientationsforwindow {     return uiinterfaceorientationmasklandscape; }  - (bool) shouldautorotate {     return yes; } 

i hope you. add 1 of this(which orientation want) method in appdelegate.m class

for force run application in landscape mode:

- (nsuinteger)application:(uiapplication *)application supportedinterfaceorientationsforwindow:(uiwindow *)window {     return uiinterfaceorientationmasklandscape; } 

for force run application in portrait mode:

- (nsuinteger)application:(uiapplication *)application supportedinterfaceorientationsforwindow:(uiwindow *)window {     return uiinterfaceorientationmaskportrait; } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -