I want to create a fullscreen camera preview where the middle of the view is a rectangle. Everything inside the rectangle should be opaque
and everything outside should be semi-transparent
:
The solid lines indicates opaque
parts of the preview (the grey rectangle) and the dotted lines are the semi-transparent
parts.
Currently, I’m using the standard AVCaptureVideoPreviewLayer
but I don’t see a way to apply any alpha
to the output let alone applying an alpha to only some areas. Is this possible?