yeahdongcn / RSBarcodes_Swift

1D and 2D barcodes reader and generators for iOS 8 with delightful controls. Now Swift.
MIT License
710 stars 185 forks source link

rectOfInterest #76

Open jesiegel1 opened 8 years ago

jesiegel1 commented 8 years ago

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.

dbpfindexp commented 7 years ago

I would be interested in this as well. Maybe I missed it too but is the RSCornerLayer suppose to be for this?

eciftcioglu commented 7 years ago

I set it as such;
self.output.rectOfInterest = CGRect(x: 0, y: 0, width: yourValue, height: yourValue)