Manos Chorianopoulos

fix CouponsView init

......@@ -254,21 +254,22 @@ extension CouponsView {
@available(iOS 13.0.0, *)
struct CouponsView: View {
// var data:Array<swiftApi.CouponItemModel> = []
var data:Array<swiftApi.CouponItemModel> = []
var data:Array<swiftApi.CouponItemModel> = DataModel().getData2
// var data:Array<swiftApi.CouponItemModel> = DataModel().getData2
var parentView: UIView
var uiscreen = UIScreen.main.bounds
// init() { //initializer method
//
// let instanceOfMySwiftApi = swiftApi()
// let couponsData = instanceOfMySwiftApi.getCoupons()
//
// self.data = couponsData
// }
init(parentView: UIView) { //initializer method
let instanceOfMySwiftApi = swiftApi()
let couponsData = instanceOfMySwiftApi.getCoupons()
self.data = couponsData
self.parentView = parentView
}
func goBack(){
for subview in parentView.subviews {
......