From dae98fbf72430573e3c1818e9efbcf3eba4aac47 Mon Sep 17 00:00:00 2001 From: Heart 3DS Date: Thu, 24 Sep 2020 11:18:15 +0700 Subject: [PATCH] update readme --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 79621b3..89a4bdc 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ Read here [https://developer.apple.com/documentation/avfoundation/avmetadataobje # How to use barcode generator view ![SwiftUI QRCode Scanner](https://raw.githubusercontent.com/heart/CarBode-Barcode-Scanner-For-SwiftUI/master/logo/generator.png) -## Excample code +## Example code ```Swift import SwiftUI @@ -196,13 +196,10 @@ struct ModalBarcodeGenerator: View { var body: some View { var body: some View { VStack { - CBScanner( - supportBarcode: .constant([.qr, .code128]), - torchLightIsOn: $torchIsOn, - cameraPosition: $cameraPosition - ){ - print($0) - }.frame(minWidth: 0, maxWidth: .infinity, minHeight: 400, maxHeight: 400, alignment: .topLeading) + CBBarcodeView(data: $dataString, + barcodeType: $barcodeType, + orientation: $rotate) + .frame(minWidth: 0, maxWidth: .infinity, minHeight: 400, maxHeight: 400, alignment: .topLeading) } } }