Vasilis

fixes

......@@ -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)
......