views:

37

answers:

1

Hello all! I am trying to make an app that will only be viewed in Landscape. I have looked up some tutorials (albeit older ones) and have done the following:
-set up the info.plist to include a key for uiinterfaceorientation
-in the main view controller I have set the frame to be 480 x 320

Now, the first screen loads up ok. Everything is where it should be and whatnot. However, if I click a button that is set to present a modal view controller nothing happens. Everything is linked and coded correctly but nothing happens when I press the button. Am I doing something wrong with trying to force landscape?

At it's basic, this question is a how do you effectively make an app that will only be in landscape mode? Thanks for any help.

A: 

hi Robert you only uncomment this method which I shown below

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); }
suchita