Skip to content

Commit 5efd2ba

Browse files
committed
add type in delegate method
1 parent b39ea37 commit 5efd2ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/BarcodeScannerController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import AVFoundation
55

66
/// Delegate to handle the captured code.
77
public protocol BarcodeScannerCodeDelegate: class {
8-
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String)
8+
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String, type: String)
99
}
1010

1111
/// Delegate to report errors.
@@ -430,7 +430,7 @@ extension BarcodeScannerController: AVCaptureMetadataOutputObjectsDelegate {
430430
}
431431

432432
animateFlash(oneTimeSearch)
433-
codeDelegate?.barcodeScanner(self, didCapturedCode: code)
433+
codeDelegate?.barcodeScanner(self, didCapturedCode: code, type: metadataObj.type)
434434
}
435435
}
436436

0 commit comments

Comments
 (0)