@@ -72,7 +72,7 @@ Use `BarcodeScannerCodeDelegate` when you want to get the captured code back.
7272
7373``` swift
7474extension ViewController : BarcodeScannerCodeDelegate {
75- func barcodeScanner (_ controller : BarcodeScannerViewController, didCaptureCode code : String , type : String ) {
75+ func scanner (_ controller : BarcodeScannerViewController, didCaptureCode code : String , type : String ) {
7676 print (code)
7777 controller.reset ()
7878 }
@@ -84,7 +84,7 @@ extension ViewController: BarcodeScannerCodeDelegate {
8484Use ` BarcodeScannerErrorDelegate ` when you want to handle session errors.
8585``` swift
8686extension ViewController : BarcodeScannerErrorDelegate {
87- func barcodeScanner (_ controller : BarcodeScannerViewController, didReceiveError error : Error ) {
87+ func scanner (_ controller : BarcodeScannerViewController, didReceiveError error : Error ) {
8888 print (error)
8989 }
9090}
@@ -98,7 +98,7 @@ it was presented initially.
9898
9999``` swift
100100extension ViewController : BarcodeScannerDismissalDelegate {
101- func barcodeScannerDidDismiss (_ controller : BarcodeScannerViewController) {
101+ func scannerDidDismiss (_ controller : BarcodeScannerViewController) {
102102 controller.dismiss (animated : true , completion : nil )
103103 }
104104}
@@ -120,7 +120,7 @@ on the code. When the task is done you have 3 options to proceed:
1201201 . Dismiss ` BarcodeScannerViewController ` and show your results.
121121
122122``` swift
123- func barcodeScanner (_ controller : BarcodeScannerViewController, didCaptureCode code : String , type : String ) {
123+ func scanner (_ controller : BarcodeScannerViewController, didCaptureCode code : String , type : String ) {
124124 // Code processing
125125 controller.dismiss (animated : true , completion : nil )
126126}
@@ -134,7 +134,7 @@ when there is no product found with a given barcode in your database):
134134</div ><br />
135135
136136``` swift
137- func barcodeScanner (_ controller : BarcodeScannerViewController, didCaptureCode code : String , type : String ) {
137+ func scanner (_ controller : BarcodeScannerViewController, didCaptureCode code : String , type : String ) {
138138 // Code processing
139139 controller.resetWithError (message : " Error message" )
140140 // If message is not provided the default message will be used instead.
@@ -144,7 +144,7 @@ func barcodeScanner(_ controller: BarcodeScannerViewController, didCaptureCode c
1441443 . Reset the controller to the scanning mode (with or without animation):
145145
146146 ``` swift
147- func barcodeScanner (_ controller : BarcodeScannerViewController, didCaptureCode code : String , type : String ) {
147+ func scanner (_ controller : BarcodeScannerViewController, didCaptureCode code : String , type : String ) {
148148 // Code processing
149149 controller.reset (animated : true )
150150 }
0 commit comments