How should we be setting the rectOfInterest on the output: AVCaptureMetadataOutput object? Presumably we need to access the AVCaptureVideoPreviewLayer object in order to call previewLayer.metadataOutputRectOfInterest(for: self.view.frame) and convert the CGRect to the proper coordinates, but the AVCaptureVideoPreviewLayer object isn't public.
How should we be setting the rectOfInterest on the
output: AVCaptureMetadataOutput
object? Presumably we need to access theAVCaptureVideoPreviewLayer
object in order to callpreviewLayer.metadataOutputRectOfInterest(for: self.view.frame)
and convert the CGRect to the proper coordinates, but theAVCaptureVideoPreviewLayer
object isn't public.