title: CALayer content goes out of bounds - iOS
body: <p>I am trying to implement camera zoom using <code>CGAffinetransform</code>. Transform is fine, but when I scale it to a bigger size, it goes out of the frame I have assigned to the <code>AVCaptureVideoPreviewLayer</code>. I tried setting <code>masksToBounds</code> property to <code>YES</code> but it didn't help.</p>
  
  <p>Can I contain it within its frame?</p>
  
  <p><strong>Edit:</strong><br>
  What I want is that I can specify a specific area for the camera preview layer, if I apply scaling transform to it, (i.e., frame of preview layer gets expanded), the part of the layer outside of the specified area gets clipped.</p>