title: ios 6.0 - Landscape not working - subclassed UINavigationController never calls shouldAutorotate method
body: <p>I have created a simple application which has a red background and a button on it (for the purposes of understanding this problem). The app is in landscape mode and being built with iOS6 framework.</p>
  
  <p>I have set the Supported interface orientations pList properties to only have: Landscape (right home button) </p>
  
  <p>If I put the methods -(BOOL)shouldAutorotate and -(NSUInteger)supportedInterfaceOrientations in the view controller and initiate it as the windows rootViewController WITHOUT using a UINavigationController then landscape orientation is achieved.</p>
  
  <p>HOWEVER if I use a subclassed UINavigationController like in the example below and implement -(BOOL)shouldAutorotate and -(NSUInteger)supportedInterfaceOrientations ,  landscape orientation is NOT achieved and -(BOOL)shouldAutorotate is never called.</p>
  
  <p>I have the following code in my Subclassed UINavigationController:</p>
  
  <pre><code> //For iOS 5.x and below
   - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
   {
    return (interfaceOrientation != UIInterfaceOrientationLandscapeRight);
   }
  
  //For iOS 6.0
  -(NSUInteger)supportedInterfaceOrientations
  {
   return UIInterfaceOrientationMaskLandscapeRight;
  }
  
  -(BOOL)shouldAutorotate
  {
  return YES;
  }
  </code></pre>
  
  <p>In my appDelegate I have these methods:</p>
  
  <pre><code> - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
  
  
  
  self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
  // Override point for customization after application launch.
  self.window.backgroundColor = [UIColor whiteColor];
  
  viewController = [[MDViewController alloc] init]; //a very simple viewcontroller containing button on red background which should be in landscape mode
  navigationController = [[MDNavigationController alloc] initWithRootViewController:viewController];
  [self.window setRootViewController:navigationController.topViewController];
  
  [self.window makeKeyAndVisible];
  return YES;
  }
  
  -(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:  (UIWindow *)window {
     return UIInterfaceOrientationMaskLandscapeRight;
   }
  </code></pre>
  
  <p>I have seen countless answers to similar questions which I implemented but found that they fail to work.
  Thanks.</p>