Showing
2 changed files
with
18 additions
and
8 deletions
No preview for this file type
... | @@ -499,14 +499,24 @@ extension GiftsView { | ... | @@ -499,14 +499,24 @@ extension GiftsView { |
499 | var body: some View { | 499 | var body: some View { |
500 | Button { | 500 | Button { |
501 | // GiftItem Action | 501 | // GiftItem Action |
502 | - let tempItem = item.asDictionary | 502 | +// let tempItem = item.asDictionary |
503 | - let instanceOfMyApi = MyApi() | 503 | +// let instanceOfMyApi = MyApi() |
504 | - let couponViewController = instanceOfMyApi.openCoupon(parentView, coupon: tempItem)! | 504 | +// let couponViewController = instanceOfMyApi.openCoupon(parentView, coupon: tempItem)! |
505 | - couponViewController.view.tag = 2 | 505 | +// couponViewController.view.tag = 2 |
506 | -// addChild(couponsViewController) | 506 | +//// addChild(couponsViewController) |
507 | - couponViewController.view.frame = parentView.frame | 507 | +// couponViewController.view.frame = parentView.frame |
508 | - parentView.addSubview(couponViewController.view) | 508 | +// parentView.addSubview(couponViewController.view) |
509 | - couponViewController.didMove(toParent: UIHostingController(rootView: self)) | 509 | +// couponViewController.didMove(toParent: UIHostingController(rootView: self)) |
510 | + | ||
511 | + // GiftItem Action | ||
512 | + let tempItem = item.asDictionary | ||
513 | + let instanceOfMyApi = MyApi() | ||
514 | + let couponBarcodeViewController = instanceOfMyApi.openCouponBarcode(parentView, coupon: tempItem)! | ||
515 | + couponBarcodeViewController.view.tag = 7 | ||
516 | + // addChild(couponsViewController) | ||
517 | + couponBarcodeViewController.view.frame = parentView.frame | ||
518 | + parentView.addSubview(couponBarcodeViewController.view) | ||
519 | + couponBarcodeViewController.didMove(toParent: UIHostingController(rootView: self)) | ||
510 | } label: { | 520 | } label: { |
511 | 521 | ||
512 | HStack(alignment: .center) { | 522 | HStack(alignment: .center) { | ... | ... |
-
Please register or login to post a comment