twostraws / CodeScanner

A SwiftUI view that is able to scan barcodes, QR codes, and more, and send back what was found.
MIT License
1.03k stars 295 forks source link

limiting Camera view #110

Open sgabardi opened 1 year ago

sgabardi commented 1 year ago

hi, i'm just beginning coding SWIFT and i'm wondering, if there is a way to limit the view of the camera and do a red line for scanning? So only the barcode that is under the red line in the camera view should be read.

thank you!

nathanfallet commented 1 year ago

I'm not sure it's possible to limit the zone for scanning, but at least you can check the ScanResult.corners and filter if it's in the area you want.