Vasilis

minor change

{
"object": {
"pins": [
{
"package": "RSBarcodes_Swift",
"repositoryURL": "https://github.com/yeahdongcn/RSBarcodes_Swift",
"state": {
"branch": null,
"revision": "86d8b1a1439e7edb19793d17732b15fd784a0a15",
"version": "5.1.1"
}
"pins" : [
{
"identity" : "rsbarcodes_swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/yeahdongcn/RSBarcodes_Swift",
"state" : {
"revision" : "86d8b1a1439e7edb19793d17732b15fd784a0a15",
"version" : "5.1.1"
}
]
},
"version": 1
}
],
"version" : 2
}
......
......@@ -11,8 +11,8 @@ import Combine
import Foundation
import UIKit
// TODO: Uncomment for barcode
//import RSBarcodes_Swift
//import AVFoundation
import RSBarcodes_Swift
import AVFoundation
......@@ -198,18 +198,18 @@ extension CouponBarcodeView {
// let isValid = RSUnifiedCodeValidator.shared.isValid(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue)
// TODO: Uncomment for barcode
// 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)) {
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)) {
//
////
// VStack(alignment: .center) {
// Image(uiImage: barcodeImage)
// .resizable()
// .aspectRatio(contentMode: .fit)
// .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)
// }
// .frame(maxWidth: .infinity)
// .padding(.top, self.uiscreen.height * 0.01)
// }
VStack(alignment: .center) {
Image(uiImage: barcodeImage)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)
}
.frame(maxWidth: .infinity)
.padding(.top, self.uiscreen.height * 0.01)
}
Text(barcodeString)
......