Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
heart committed Sep 24, 2020
1 parent 53a505a commit dae98fb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
}
}
}
Expand Down

0 comments on commit dae98fb

Please sign in to comment.