twostraws / CodeScanner

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

Preview video does not respect frame provided by parent #3

Closed Continuities closed 4 years ago

Continuities commented 4 years ago

Reproduction code:

CodeScannerView(codeTypes: [ .qr ], simulatedData: "fake data") {
  print($0)
}
.frame(width: 200, height: 200, alignment: .center)

Expected: The preview video for the scanner is 200x200, and centered in the view Actual: The preview video is sized to the full screen, and off-center