0

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.

Robert
  • 35
  • 6

1 Answers1

0

You should only uncomment this method I show you below:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  // Return YES for supported orientations
  return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
Matteo Alessani
  • 10,264
  • 4
  • 40
  • 57
iOS_User
  • 1,372
  • 5
  • 21
  • 35