title: landscape mode in iOS6 in middle of the app
body: <p>Am using iOS6 device  xcode 4.5 &amp; mountain lion mac.
  And in my app am starting in portrait mode(3 screens).
  But 4th screen should be in landscape and should support landscape left &amp; landscape right.</p>
  
  <p>Most of the explanations are shown how to rotate.</p>
  
  <p>in appddelegate am using </p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
        UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
  navigationController.navigationBar.tintColor = [UIColor blackColor];
  
  
  // Set RootViewController to window
  if ( [[UIDevice currentDevice].systemVersion floatValue] &lt; 6.0)
  {
      // warning: addSubView doesn't work on iOS6
       [self.window addSubview: navigationController.view];
  }   
  else
  {
       // use this mehod on ios6
       [self.window setRootViewController:navigationController];
  }
  
  }
  - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
  {
      if(self.shouldRotate ) //shouldRotate is my flag
      {
           self.shouldRotate = NO;
           return (UIInterfaceOrientationMaskLandscapeRight);
      }
      return (UIInterfaceOrientationMaskPortrait);
  }
  </code></pre>
  
  <p>and in my view controller which should be landscape and am using</p>
  
  <pre><code> - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  {
       AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
      self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
      if (self)
      {
           appDelegate.shouldRotate = YES;
          // Custom initialization
      }
       return self;
   }
  
  
  
  - (BOOL)shouldAutorotate
  {
       return YES;
  }
  
  - (NSUInteger)supportedInterfaceOrientations
  {
        return UIInterfaceOrientationMaskLandscape;
  }
  </code></pre>
  
  <p>In my viewcontrollers which are potrait are working correctly in which am using</p>
  
  <pre><code>- (BOOL)shouldAutorotate
  {
       return YES;
  }
  
  - (NSUInteger)supportedInterfaceOrientations
  {
        return UIInterfaceOrientationMaskPortrait;
  }
  </code></pre>
  
  <p>can any one suggest to do this</p>
  
  <p>Thanks in advance</p>