title: shouldAutorotateToInterfaceOrientation is not working in iOS 6
body: <p>In iOS 6, <code>shouldAutorotateToInterfaceOrientation</code> is not working, but it worked fine in iOS 5.0 and 5.1.</p>
  <p>What do I need to change for iOS 6? Here is my code:</p>
  <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  if([[[SampleApplicationAppDelegate instance].callInfoDictionary valueForKey:IS_CHAT] isEqualToString:NO_RESPONSE])
  {
      int nAngle = 0;
      BOOL bRet = NO;
      
      switch (interfaceOrientation) {
          case UIInterfaceOrientationPortrait:
              nAngle = 90;
              bRet = YES;
              NSLog(@&quot;.......Preview = %f %f&quot;,_previewCamera.frame.size.width,_previewCamera.frame.size.height);
              
              _previewCamera.transform = CGAffineTransformMakeRotation(M_PI*1.5);
              
              NSLog(@&quot;Preview = %f %f&quot;,_previewCamera.frame.size.width,_previewCamera.frame.size.height);
              break;
              
          case UIInterfaceOrientationPortraitUpsideDown:
              nAngle = 270;
              bRet = YES;
              _previewCamera.transform = CGAffineTransformMakeRotation(M_PI_2);
              break;
              
          case UIInterfaceOrientationLandscapeLeft:
              nAngle = 0;
              bRet = YES;
              //_previewCamera.transform = CGAffineTransformMakeRotation(M_PI*1.5);
              break;
              
          case UIInterfaceOrientationLandscapeRight:
              nAngle = 180;
              bRet = YES;
              //_previewCamera.transform = CGAffineTransformMakeRotation(M_PI_2);
              break;
              
          default:
              break;
      }                
      return bRet;
  }    
  if(interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
      return YES;     
  return NO;    
  }
  </code></pre>
  <p>When I searched for this orientation problem, all I found was <a href="https://stackoverflow.com/questions/11441762/stop-uiview-from-roating-into-landscape">this</a> and <a href="https://stackoverflow.com/questions/12260261/shouldautorotatetointerfaceorientation-not-being-called-in-ios-6">this</a>, but nothing worked for me :(</p>
  <p>Please help .....</p>