title: AVCaptureVideoPreviewLayer orientation - need landscape
body: <p>My app is landscape only. I'm presenting the AVCaptureVideoPreviewLayer like this:</p>
  
  <pre><code>self.previewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session];
  [self.previewLayer setBackgroundColor:[[UIColor blackColor] CGColor]];
  [self.previewLayer setVideoGravity:AVLayerVideoGravityResizeAspect];                    
  NSLog(@"previewView: %@", self.previewView);
  CALayer *rootLayer = [self.previewView layer];
  [rootLayer setMasksToBounds:YES];
  [self.previewLayer setFrame:[rootLayer bounds]];
      NSLog(@"previewlayer: %f, %f, %f, %f", self.previewLayer.frame.origin.x, self.previewLayer.frame.origin.y, self.previewLayer.frame.size.width, self.previewLayer.frame.size.height);
  [rootLayer addSublayer:self.previewLayer];
  [session startRunning];
  </code></pre>
  
  <p>self.previewView has a frame of (0,0,568,320), which is correct. self.previewLayer logs a frame of (0,0,568,320), which is theoretically correct. However, the camera display appears as a portrait rectangle in the middle of the landscape screen, and the orientation of the camera preview image is wrong by 90 degrees. What am I doing wrong? I need the camera preview layer to appear in the full screen, in landscape mode, and the image should be orientated correctly.</p>