title: Present a modal view controller in landscape when the iphone turn to landscape
body: <p>I have an iPhone app which works all the time works in portrait.</p>
  
  <p>This app has a navigation view controller and the <code>rootViewcontroller</code> which is shown in portrait too. I'd like present a <code>viewController</code> when the iPhone is turned to landscape and dismiss this view controller when the app is turned back to portrait.</p>
  
  <p>Currently I have achieved this but my views are totally moved:</p>
  
  <p>Step1:
  <img src="https://i.stack.imgur.com/wVDJ7.png" alt="Step1"></p>
  
  <p>Step2:</p>
  
  <p><img src="https://i.stack.imgur.com/xdfzJ.png" alt="Step2"></p>
  
  <p>Step3:
  <img src="https://i.stack.imgur.com/nKk8e.png" alt="Step3"></p>
  
  <p>I tried several things, but I don't know if I'm choosing the right way:</p>
  
  <pre><code>-(BOOL)shouldAutorotate
  {
       return YES;
  }
  
  -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation     duration:(NSTimeInterval)duration
  {
  
  
   }
  
  -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
  {
      if ([[UIApplication sharedApplication] statusBarOrientation] ==    UIInterfaceOrientationLandscapeLeft || [[UIApplication sharedApplication]  statusBarOrientation] == UIInterfaceOrientationLandscapeRight) {
          UIStoryboard *currentStoryboar = [self storyboard];
          ASTBigProgressViewController *bigProgress = [currentStoryboar instantiateViewControllerWithIdentifier:@"ASTBigProgressViewController"];
          [self presentViewController:bigProgress animated:YES completion:^{
  
          }];
      }
  }
  -(NSUInteger)supportedInterfaceOrientations
  { 
      return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft |
              UIInterfaceOrientationMaskLandscapeRight |     UIInterfaceOrientationMaskPortraitUpsideDown);
  }
  </code></pre>
  
  <p>I'd like that when the view controller is turned, it doesn't turn the view keeping it in the same position. I tried:</p>
  
  <pre><code>-(BOOL)shouldAutorotate
  {
       return NO;
  } 
  </code></pre>
  
  <p>But obviously the <code>didRotateFromInterfaceOrientation</code> method is not called.</p>
  
  <p>Any idea?</p>