Showing
3 changed files
with
22 additions
and
24 deletions
1 | { | 1 | { |
2 | - "object": { | 2 | + "pins" : [ |
3 | - "pins": [ | ||
4 | { | 3 | { |
5 | - "package": "RSBarcodes_Swift", | 4 | + "identity" : "rsbarcodes_swift", |
6 | - "repositoryURL": "https://github.com/yeahdongcn/RSBarcodes_Swift", | 5 | + "kind" : "remoteSourceControl", |
7 | - "state": { | 6 | + "location" : "https://github.com/yeahdongcn/RSBarcodes_Swift", |
8 | - "branch": null, | 7 | + "state" : { |
9 | - "revision": "86d8b1a1439e7edb19793d17732b15fd784a0a15", | 8 | + "revision" : "86d8b1a1439e7edb19793d17732b15fd784a0a15", |
10 | - "version": "5.1.1" | 9 | + "version" : "5.1.1" |
11 | } | 10 | } |
12 | } | 11 | } |
13 | - ] | 12 | + ], |
14 | - }, | 13 | + "version" : 2 |
15 | - "version": 1 | ||
16 | } | 14 | } | ... | ... |
No preview for this file type
... | @@ -11,8 +11,8 @@ import Combine | ... | @@ -11,8 +11,8 @@ import Combine |
11 | import Foundation | 11 | import Foundation |
12 | import UIKit | 12 | import UIKit |
13 | // TODO: Uncomment for barcode | 13 | // TODO: Uncomment for barcode |
14 | -//import RSBarcodes_Swift | 14 | +import RSBarcodes_Swift |
15 | -//import AVFoundation | 15 | +import AVFoundation |
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
... | @@ -198,18 +198,18 @@ extension CouponBarcodeView { | ... | @@ -198,18 +198,18 @@ extension CouponBarcodeView { |
198 | // let isValid = RSUnifiedCodeValidator.shared.isValid(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue) | 198 | // let isValid = RSUnifiedCodeValidator.shared.isValid(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue) |
199 | 199 | ||
200 | // TODO: Uncomment for barcode | 200 | // TODO: Uncomment for barcode |
201 | -// if let barcodeImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)) { | 201 | + if let barcodeImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)) { |
202 | + | ||
202 | // | 203 | // |
203 | -//// | 204 | + VStack(alignment: .center) { |
204 | -// VStack(alignment: .center) { | 205 | + Image(uiImage: barcodeImage) |
205 | -// Image(uiImage: barcodeImage) | 206 | + .resizable() |
206 | -// .resizable() | 207 | + .aspectRatio(contentMode: .fit) |
207 | -// .aspectRatio(contentMode: .fit) | 208 | + .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1) |
208 | -// .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1) | 209 | + } |
209 | -// } | 210 | + .frame(maxWidth: .infinity) |
210 | -// .frame(maxWidth: .infinity) | 211 | + .padding(.top, self.uiscreen.height * 0.01) |
211 | -// .padding(.top, self.uiscreen.height * 0.01) | 212 | + } |
212 | -// } | ||
213 | 213 | ||
214 | 214 | ||
215 | Text(barcodeString) | 215 | Text(barcodeString) | ... | ... |
-
Please register or login to post a comment