Vasilis

addition of open methods in swiftapi

...@@ -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
...@@ -330,4 +331,12 @@ public class swiftApi { ...@@ -330,4 +331,12 @@ public class swiftApi {
330 public func getCampaigns() -> Array<CampaignItemModel> { 331 public func getCampaigns() -> Array<CampaignItemModel> {
331 return CampaignDataModel().getData 332 return CampaignDataModel().getData
332 } 333 }
334 +
335 + public func openCoupon(parent: UIView, coupon: CouponSetItemModel) -> UIViewController {
336 + return UIHostingController(rootView: CouponView(parentView: parent, coupon: coupon))
337 + }
338 +
339 + public func openCouponBarcode(parent: UIView, coupon: CouponSetItemModel) -> UIViewController {
340 + return UIHostingController(rootView: CouponBarcodeView(parentView: parent, coupon: coupon))
341 + }
333 } 342 }
......