Manos Chorianopoulos

fix CouponsView init

...@@ -254,21 +254,22 @@ extension CouponsView { ...@@ -254,21 +254,22 @@ extension CouponsView {
254 @available(iOS 13.0.0, *) 254 @available(iOS 13.0.0, *)
255 struct CouponsView: View { 255 struct CouponsView: View {
256 256
257 -// var data:Array<swiftApi.CouponItemModel> = [] 257 + var data:Array<swiftApi.CouponItemModel> = []
258 258
259 - var data:Array<swiftApi.CouponItemModel> = DataModel().getData2 259 +// var data:Array<swiftApi.CouponItemModel> = DataModel().getData2
260 260
261 var parentView: UIView 261 var parentView: UIView
262 262
263 var uiscreen = UIScreen.main.bounds 263 var uiscreen = UIScreen.main.bounds
264 264
265 -// init() { //initializer method 265 + init(parentView: UIView) { //initializer method
266 -// 266 +
267 -// let instanceOfMySwiftApi = swiftApi() 267 + let instanceOfMySwiftApi = swiftApi()
268 -// let couponsData = instanceOfMySwiftApi.getCoupons() 268 + let couponsData = instanceOfMySwiftApi.getCoupons()
269 -// 269 +
270 -// self.data = couponsData 270 + self.data = couponsData
271 -// } 271 + self.parentView = parentView
272 + }
272 273
273 func goBack(){ 274 func goBack(){
274 for subview in parentView.subviews { 275 for subview in parentView.subviews {
......