2

is it possible to create 2 storyboards and access each of them depending on the device orientation? I tried this code:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return YES;

    if (UIInterfaceOrientationPortrait){
              UIStoryboard *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"Storyboardland.storyboard"];


    }else if (UIInterfaceOrientationPortraitUpsideDown){
        UIStoryboard *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"MainStoryboard_iPad.storyboard"];

    }}

...but does not work?? Any errors I am making??

shannoga
  • 19,649
  • 20
  • 104
  • 169
Alessandro
  • 4,000
  • 12
  • 63
  • 131

1 Answers1

2

I think this answer to a previous post (iPhone Storyboard: different scene for portrait and landscape) might solve your problem. It explains how to have a different views for portrait and landscape modes, but still uses the same view controller.

Community
  • 1
  • 1
T.J.
  • 3,942
  • 2
  • 32
  • 40