title: Orientation issue in Landscape mode while opening camera in iOS 7 in iPhone
body: <p>I am having an app which is only in Landscape Mode. In my app I am opening the Camera from one of my views. It is working well for my iPad but on iPhone it crashes. It is working well in iOS 6 but the app crashes for iOS 7 and only for iPhone.</p>
  
  <p>Below is my code.</p>
  
  <pre><code>if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
  {
  
      ipc=[[UIImagePickerController alloc] init ];
      ipc.delegate=self;
      ipc.sourceType=UIImagePickerControllerSourceTypeCamera;
      [self presentViewController:ipc animated:YES completion:nil];
  } 
  else {
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Desc" message:@"Camera capture is not supported in this device" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
      [alert show];
      [alert release];
  }
  </code></pre>
  
  <p>How to solve this issue?</p>
  
  <p>It crashes when I select to capture from camera. It doesn't crash from the above code but after that it crashes with below error.</p>
  
  <p>I am getting this error:</p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES</p>
  </blockquote>
  
  <p>And my app crashes.</p>
  
  <p><strong>My orientation code on this view.</strong></p>
  
  <pre><code>-(BOOL)shouldAutorotate
  {
      return YES;
  }
  
  -(NSUInteger)supportedInterfaceOrientations
  {
      return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight ;
  }
  </code></pre>