title: Scale of AVCaptureVideoPreviewLayer
body: <p>I am currently working on a QR Scan View in my Swift application.
  I want to center the VideoPreview in the middle of my view.</p>
  
  <p>The view looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/o33hF.png" alt="Image of the View I&#39;m working on"></p>
  
  <p>The view (white) is called <code>ScanView</code> and I want to make the image preview the same size as the <code>ScanView</code> and center it in it.</p>
  
  <p>Code snippet:</p>
  
  <p><img src="https://i.stack.imgur.com/Y9cfN.png" alt="Setup of my VideoDevice"></p>
  
  <p>Thanks for every help!</p>