Skip to content

Commit

Permalink
found each QR code separately in manual mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hossinasaadi authored Mar 28, 2023
1 parent 65cd76b commit b8b975a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Sources/CodeScanner/ScannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,16 @@ extension CodeScannerView {
let features = detector.features(in: ciImage)

for feature in features as! [CIQRCodeFeature] {
qrCodeLink += feature.messageString!
}
qrCodeLink = feature.messageString!
if qrCodeLink == "" {
didFail(reason: .badOutput)
} else {
let result = ScanResult(string: qrCodeLink, type: .qr, image: qrcodeImg)
found(result)
}

if qrCodeLink == "" {
didFail(reason: .badOutput)
} else {
let result = ScanResult(string: qrCodeLink, type: .qr, image: qrcodeImg)
found(result)
}

} else {
print("Something went wrong")
}
Expand Down

0 comments on commit b8b975a

Please sign in to comment.