I have a completely empty single view application targeting iOS 5.1 and I am attempting to get the app to work only in landscape mode.
In the project summary screen I have selected both landscape options and I have deselected portrait options.
I verified in the info.plist that only landscape orientations appear.
In the storyboard I selected the view controller went to simulated metrics and selected landscape for the orientation.
When the app initially opens a black screen is displayed in landscape mode. When the plain white view is displayed it is in portrait mode. I have read through a number of posts and haven’t been able to find a solution to this problem.
I feel like I am overlooking something simple but in the past when I wanted to make an app in landscape mode I just selected landscape in summary and it worked.
Any suggestions would be greatly appreciated.
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
Do you have the following function implemented in your root view controller?
http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/RespondingtoDeviceOrientationChanges/RespondingtoDeviceOrientationChanges.html