Vasilis

fixes

...@@ -187,13 +187,13 @@ extension CouponsView { ...@@ -187,13 +187,13 @@ extension CouponsView {
187 VStack(alignment: .leading) { 187 VStack(alignment: .leading) {
188 Button { 188 Button {
189 // GiftItem Action 189 // GiftItem Action
190 - let instanceOfMyApi = MyApi() 190 + let instanceOfMySwiftApi = swiftApi()
191 - let couponBarcodeViewController = instanceOfMyApi.openCouponBarcode(parentView, coupon: result as! [String : Any])! 191 + let couponBarcodeViewController = instanceOfMySwiftApi.openCouponBarcode(parent: parentView, coupon: result)
192 couponBarcodeViewController.view.tag = 7 192 couponBarcodeViewController.view.tag = 7
193 // addChild(couponsViewController) 193 // addChild(couponsViewController)
194 couponBarcodeViewController.view.frame = parentView.frame 194 couponBarcodeViewController.view.frame = parentView.frame
195 parentView.addSubview(couponBarcodeViewController.view) 195 parentView.addSubview(couponBarcodeViewController.view)
196 - couponBarcodeViewController.didMove(toParent: UIHostingController(rootView: self)) 196 +// couponBarcodeViewController.didMove(toParent: UIHostingController(rootView: self))
197 } label: { 197 } label: {
198 HStack(alignment: .center) { 198 HStack(alignment: .center) {
199 ImageView(withURL: couponSetData?.img_preview ?? "") 199 ImageView(withURL: couponSetData?.img_preview ?? "")
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
6 // 6 //
7 7
8 import Foundation 8 import Foundation
9 +import SwiftUI
9 10
10 public class swiftApi { 11 public class swiftApi {
11 12
......