title: When does it changes orientation to default orientation?
body: <p>I'm developing an iOS application with latest SDK.</p>
  
  <p>My app only supports Landscape right orientation and it only has one view controller. I set the only available orientation modifying <code>myProject-info.plist</code>.</p>
  
  <p>I'm trying to understand why this code outputs a log for a view in Portrait mode when I only supports landscape right orientation.</p>
  
  <pre><code>- (void) viewWillAppear:(BOOL)animated
  {
      [super viewWillAppear:animated];
      UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
      UIView *videoView = self.videoPreviewView;
      NSLog(@"Video frame: %@", NSStringFromCGRect(videoView.frame));
  }
  </code></pre>
  
  <p>Console output:</p>
  
  <pre><code>Video frame: {{0, 0}, {320, 568}}
  </code></pre>
  
  <p>I'm working with <code>AVCaptureVideoPreviewLayer</code> and I need to set its frame, but when I do it on <code>viewWillAppear:</code> I get portrait values but <code>orientation</code> value is Landscape right.</p>
  
  <p><strong>Is there an event or anything similar that i gets triggered when orientation changes to landscape?</strong></p>
  
  <p><strong>When does the app changes orientation to default orientation?</strong></p>