Skip to content

Commit 20af50e

Browse files
committed
Merge branch 'release/2.1.1'
2 parents 6d34401 + dfd64e5 commit 20af50e

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

ExampleProject/ExampleProject/ModalScannerView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct ModalScannerView: View {
5757
cameraPosition: $cameraPosition,
5858
mockBarCode: .constant(BarcodeData(value:"My Test Data", type: .qr))
5959
){
60-
print($0)
60+
print("BarCodeType =",$0.type.rawValue, "Value =",$0.value)
6161
}
6262
onDraw: {
6363
print("Preview View Size = \($0.cameraPreviewView.bounds)")

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The preferred way of installing SwiftUIX is via the [Swift Package Manager](http
3939
4040
1. In Xcode, open your project and navigate to **File****Swift Packages****Add Package Dependency...**
4141
2. Paste the repository URL (`https://github.com/heart/CarBode-Barcode-Scanner-For-SwiftUI`) and click **Next**.
42-
3. For **Rules**, select **Branch** (with branch set to `2.1.0` ).
42+
3. For **Rules**, select **Branch** (with branch set to `2.1.1` ).
4343
4. Click **Finish**.
4444

4545
# Example project
@@ -73,8 +73,7 @@ struct ContentView: View {
7373
scanInterval: .constant(5.0) //Event will trigger every 5 seconds
7474
){
7575
//When the scanner found a barcode
76-
print($0.value)
77-
print("Barcode Type is", $0.type.rawValue)
76+
print("BarCodeType =",$0.type.rawValue, "Value =",$0.value)
7877
}
7978

8079
}
@@ -95,8 +94,7 @@ struct ContentView: View {
9594
scanInterval: .constant(5.0) //Event will trigger every 5 seconds
9695
){
9796
//When the scanner found a barcode
98-
print($0.value)
99-
print("Barcode Type is", $0.type.rawValue)
97+
print("BarCodeType =",$0.type.rawValue, "Value =",$0.value)
10098
}
10199
onDraw: {
102100
print("Preview View Size = \($0.cameraPreviewView.bounds)")
@@ -145,8 +143,7 @@ struct ContentView: View {
145143
torchLightIsOn: $torchIsOn // Bind a Bool to enable/disable torch light
146144
){
147145
//When the scanner found a barcode
148-
print($0.value)
149-
print("Barcode Type is", $0.type.rawValue)
146+
print("BarCodeType =",$0.type.rawValue, "Value =",$0.value)
150147
}
151148
}
152149
}
@@ -191,8 +188,7 @@ struct ContentView: View {
191188
cameraPosition: $cameraPosition //Bind to switch front/back camera
192189
){
193190
//When the scanner found a barcode
194-
print($0.value)
195-
print("Barcode Type is", $0.type.rawValue)
191+
print("BarCodeType =",$0.type.rawValue, "Value =",$0.value)
196192
}
197193
}
198194
}
@@ -213,8 +209,7 @@ No need to remove the mock barcode from the production app it will only use for
213209
mockBarCode: .constant(BarcodeData(value:"Mocking data", type: .qr))
214210
){
215211
//When you click the button on screen mock data will appear here
216-
print($0.value)
217-
print("Barcode Type is", $0.type.rawValue)
212+
print("BarCodeType =",$0.type.rawValue, "Value =",$0.value)
218213
}
219214
```
220215

@@ -285,6 +280,7 @@ CBBarcodeView(data: ..... ,
285280
CarBode welcomes contributions in the form of GitHub issues and pull-requests.
286281

287282
## Changelog
283+
- 2.1.1 Fixed bugs
288284
- 2.1.0 You can draw a box around the barcode
289285
- 2.0.1 Fixed bugs
290286
- 2.0.0 I learned many more things about SwiftUI then I decide to restructure the scanner I hope you will like it. And this version you can switch front and back camera.

0 commit comments

Comments
 (0)