title: AVCaptureVideoPreviewLayer smooth orientation rotation
body: <p>I'm trying to disable any discernable orientation rotation to an AVCaptureVideoPreviewLayer while still maintaining rotation for any subviews. AVCaptureVideoPreviewLayer does have an orientation property, and changing it does allow for the layer to display properly for any orientation. However, the rotation involves some funky rotation of the AVCaptureVideoPreviewLayer, rather than staying smooth as it does in the Camera app.</p>
  
  <p>This is how I've gotten orientation to work properly, minus the hitch in the rotation:</p>
  
  <pre><code>- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
  {
      _captureVideoPreviewLayer.frame = self.view.bounds;
      _captureVideoPreviewLayer.orientation = [[UIDevice currentDevice] orientation];
  }
  </code></pre>
  
  <p>How do I get this layer to act like the Camera app, while maintaining rotations for its subviews?</p>
  
  <p>Also, as an aside, I've seen that the orientation property is depreciated on AVCaptureVideoPreviewLayer, and the videoOrientation property of AVCaptureConnection should be used instead, but I don't think I have an AVCaptureConnection to access here (I'm simply displaying the camera on the screen). How should I set this up to access videoOrientation?</p>