Reputation: 313
I'm working with Navigation Controller in my storyboard, but my application is always in portrait format when I put the simulator in landscape. Why? =(
Upvotes: 1
Views: 516
Reputation: 11855
Change
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
To
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
Also make sure in your project settings you have 'Supported Device Orientations' set to allow Landscape.
Upvotes: 1