Manos Chorianopoulos

GiftsView changes

......@@ -499,14 +499,24 @@ extension GiftsView {
var body: some View {
Button {
// GiftItem Action
// let tempItem = item.asDictionary
// let instanceOfMyApi = MyApi()
// let couponViewController = instanceOfMyApi.openCoupon(parentView, coupon: tempItem)!
// couponViewController.view.tag = 2
//// addChild(couponsViewController)
// couponViewController.view.frame = parentView.frame
// parentView.addSubview(couponViewController.view)
// couponViewController.didMove(toParent: UIHostingController(rootView: self))
// GiftItem Action
let tempItem = item.asDictionary
let instanceOfMyApi = MyApi()
let couponViewController = instanceOfMyApi.openCoupon(parentView, coupon: tempItem)!
couponViewController.view.tag = 2
// addChild(couponsViewController)
couponViewController.view.frame = parentView.frame
parentView.addSubview(couponViewController.view)
couponViewController.didMove(toParent: UIHostingController(rootView: self))
let couponBarcodeViewController = instanceOfMyApi.openCouponBarcode(parentView, coupon: tempItem)!
couponBarcodeViewController.view.tag = 7
// addChild(couponsViewController)
couponBarcodeViewController.view.frame = parentView.frame
parentView.addSubview(couponBarcodeViewController.view)
couponBarcodeViewController.didMove(toParent: UIHostingController(rootView: self))
} label: {
HStack(alignment: .center) {
......