Showing
2 changed files
with
16 additions
and
6 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 | ||
503 | +// let instanceOfMyApi = MyApi() | ||
504 | +// let couponViewController = instanceOfMyApi.openCoupon(parentView, coupon: tempItem)! | ||
505 | +// couponViewController.view.tag = 2 | ||
506 | +//// addChild(couponsViewController) | ||
507 | +// couponViewController.view.frame = parentView.frame | ||
508 | +// parentView.addSubview(couponViewController.view) | ||
509 | +// couponViewController.didMove(toParent: UIHostingController(rootView: self)) | ||
510 | + | ||
511 | + // GiftItem Action | ||
502 | let tempItem = item.asDictionary | 512 | let tempItem = item.asDictionary |
503 | let instanceOfMyApi = MyApi() | 513 | let instanceOfMyApi = MyApi() |
504 | - let couponViewController = instanceOfMyApi.openCoupon(parentView, coupon: tempItem)! | 514 | + let couponBarcodeViewController = instanceOfMyApi.openCouponBarcode(parentView, coupon: tempItem)! |
505 | - couponViewController.view.tag = 2 | 515 | + couponBarcodeViewController.view.tag = 7 |
506 | -// addChild(couponsViewController) | 516 | + // addChild(couponsViewController) |
507 | - couponViewController.view.frame = parentView.frame | 517 | + couponBarcodeViewController.view.frame = parentView.frame |
508 | - parentView.addSubview(couponViewController.view) | 518 | + parentView.addSubview(couponBarcodeViewController.view) |
509 | - couponViewController.didMove(toParent: UIHostingController(rootView: self)) | 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