Manos Chorianopoulos

barcode lib v18

...@@ -209,7 +209,7 @@ extension CouponBarcodeView { ...@@ -209,7 +209,7 @@ extension CouponBarcodeView {
209 } 209 }
210 .frame(maxWidth: .infinity) 210 .frame(maxWidth: .infinity)
211 211
212 - if (CharacterSet.decimalDigits.isSuperset(of: CharacterSet(charactersIn: "1234567891234"))) { 212 + if (CharacterSet.decimalDigits.isSuperset(of: CharacterSet(charactersIn: coupon["coupon"] as? String ?? ""))) {
213 VStack(alignment: .center) { 213 VStack(alignment: .center) {
214 VStack {} 214 VStack {}
215 .frame(height: 1) 215 .frame(height: 1)
...@@ -373,6 +373,18 @@ extension CouponBarcodeView { ...@@ -373,6 +373,18 @@ extension CouponBarcodeView {
373 } 373 }
374 .frame(width:self.uiscreen.width) 374 .frame(width:self.uiscreen.width)
375 .frame(maxHeight: .infinity) 375 .frame(maxHeight: .infinity)
376 + .onAppear {
377 + // If you want to setup data with model
378 + // couponset = CouponSetItemModel(dictionary: coupon)
379 +
380 + print("==================")
381 + print(coupon["coupon"] as? String ?? "")
382 + print("==================")
383 +
384 + print("========constructBarcode()==========")
385 + print(constructBarcode() ?? "")
386 + print("========constructBarcode()==========")
387 + }
376 } 388 }
377 } 389 }
378 390
...@@ -428,11 +440,10 @@ struct CouponBarcodeView: View { ...@@ -428,11 +440,10 @@ struct CouponBarcodeView: View {
428 .edgesIgnoringSafeArea([.bottom]) 440 .edgesIgnoringSafeArea([.bottom])
429 .frame(width:self.uiscreen.width) 441 .frame(width:self.uiscreen.width)
430 .frame(maxHeight: .infinity) 442 .frame(maxHeight: .infinity)
431 -// .onAppear { 443 +// .onAppear {
432 -// // If you want to setup data with model 444 +// // If you want to setup data with model
433 // couponset = CouponSetItemModel(dictionary: coupon) 445 // couponset = CouponSetItemModel(dictionary: coupon)
434 -// 446 +// }
435 -// }
436 } 447 }
437 } 448 }
438 #endif 449 #endif
......