Skip to content

Commit dae98fb

Browse files
committed
update readme
1 parent 53a505a commit dae98fb

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

README.md

+5-8
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Read here [https://developer.apple.com/documentation/avfoundation/avmetadataobje
184184
# How to use barcode generator view
185185
![SwiftUI QRCode Scanner](https://raw.githubusercontent.com/heart/CarBode-Barcode-Scanner-For-SwiftUI/master/logo/generator.png)
186186

187-
## Excample code
187+
## Example code
188188
```Swift
189189
import SwiftUI
190190

@@ -196,13 +196,10 @@ struct ModalBarcodeGenerator: View {
196196
var body: some View {
197197
var body: some View {
198198
VStack {
199-
CBScanner(
200-
supportBarcode: .constant([.qr, .code128]),
201-
torchLightIsOn: $torchIsOn,
202-
cameraPosition: $cameraPosition
203-
){
204-
print($0)
205-
}.frame(minWidth: 0, maxWidth: .infinity, minHeight: 400, maxHeight: 400, alignment: .topLeading)
199+
CBBarcodeView(data: $dataString,
200+
barcodeType: $barcodeType,
201+
orientation: $rotate)
202+
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 400, maxHeight: 400, alignment: .topLeading)
206203
}
207204
}
208205
}

0 commit comments

Comments
 (0)