title: ios: Custom Segue between two viewcontrollers in landscape mode
body: <p>I have two UIViewControllers that are contained in a navigatoin view controller and both in landscape mode. I want to switch between two uiviewcontroller without have an animation like push. Therefore I perform a custom segue between these two if the user clicks in the first viewcontroller a button.</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import "AppDelegate.h"
  
  @class AppDelegate;
  
  @interface NonAnimatedSegue : UIStoryboardSegue {
  
  }
  
  @property (nonatomic,assign) AppDelegate* appDelegate;
  
  @end
  </code></pre>
  
  <p>And this the implementation:</p>
  
  <pre><code>#import "NonAnimatedSegue.h"
  
  @implementation NonAnimatedSegue
  
  @synthesize appDelegate = _appDelegate;
  
  -(void) perform{
      self.appDelegate = [[UIApplication sharedApplication] delegate];
      UIViewController *srcViewController = (UIViewController *) self.sourceViewController;
      UIViewController *destViewController = (UIViewController *) self.destinationViewController;
  [srcViewController.view removeFromSuperview];
  [self.appDelegate.window addSubview:destViewController.view];
  self.appDelegate.window.rootViewController=destViewController;
  }
  
  @end
  </code></pre>
  
  <p>In the storyboard I switched to custom segue and actually it works fine. The only problem is that the second uiviewcontroller is not displayed in landscape mode but in protrait. If I remove the custom segue and replace it with a push segue then everything works fine, the second viewcontroller is displayed in landscape mode. </p>
  
  <p>So what do I have to do such that the second viewcontroller is also in landscape view if I use my custom segue?</p>