title: shouldAutorotateToInterfaceOrientation: never called
body: <p>I set supported Interface Orientations to be all except Portrait upside down under Deployment Info.</p>
  
  <p>I would like to override shouldAutorotateToInterfaceOrientation: for custom behaviour. (i.e support landscape as per condition)</p>
  
  <p>I only have one viewcontroller due to constraints(customized view transitions)</p>
  
  <p>this is what the code in my appdelegate looks like:</p>
  
  <pre><code>self.viewController = [[MyController alloc]initWithNibName:nil bundle:nil];
  
  self.window.rootViewController = self.viewController;
  [self.window makeKeyAndVisible];
  return YES;
  </code></pre>
  
  <p>and in myController.m, i override shouldAutorotateToInterfaceOrientation:</p>
  
  <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
      return YES;
  }
  </code></pre>
  
  <p>the application autorotates to all orientations but portrait upside down and the call back is never called. I have tried the suggestion at <a href="https://stackoverflow.com/questions/6518961/change-return-from-shouldautorotatetointerfaceorientation-at-runtime">change return from shouldAutorotateToInterfaceOrientation: at runTime</a> with no success. why?</p>
  
  <p>on a side note, what would be the best way to change rotation support at runtime? </p>
  
  <p><strong>update:</strong></p>
  
  <pre><code>- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
  </code></pre>
  
  <p>gets called. I tried placing in</p>
  
  <pre><code>[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];
  </code></pre>
  
  <p>with no success :(</p>