Showing
9 changed files
with
85 additions
and
63 deletions
No preview for this file type
... | @@ -30,8 +30,8 @@ | ... | @@ -30,8 +30,8 @@ |
30 | filePath = "WarplySDKFrameworkIOS/CouponsView.swift" | 30 | filePath = "WarplySDKFrameworkIOS/CouponsView.swift" |
31 | startingColumnNumber = "9223372036854775807" | 31 | startingColumnNumber = "9223372036854775807" |
32 | endingColumnNumber = "9223372036854775807" | 32 | endingColumnNumber = "9223372036854775807" |
33 | - startingLineNumber = "212" | 33 | + startingLineNumber = "218" |
34 | - endingLineNumber = "212" | 34 | + endingLineNumber = "218" |
35 | landmarkName = "body" | 35 | landmarkName = "body" |
36 | landmarkType = "24"> | 36 | landmarkType = "24"> |
37 | </BreakpointContent> | 37 | </BreakpointContent> | ... | ... |
... | @@ -11,9 +11,9 @@ import SwiftUI | ... | @@ -11,9 +11,9 @@ import SwiftUI |
11 | @available(iOS 13.0.0, *) | 11 | @available(iOS 13.0.0, *) |
12 | @objc public class CouponBarcodeViewInterface : NSObject { | 12 | @objc public class CouponBarcodeViewInterface : NSObject { |
13 | 13 | ||
14 | - @objc(couponBarcodeViewController::) static public func couponBarcodeViewController(parentView: UIView?, coupon: Dictionary<String, Any>) -> UIViewController { | 14 | +// @objc(couponBarcodeViewController::) static public func couponBarcodeViewController(parentView: UIView?, coupon: Dictionary<String, Any>) -> UIViewController { |
15 | - return UIHostingController(rootView: CouponBarcodeView(parentView: parentView!, coupon: coupon)) | 15 | +// return UIHostingController(rootView: CouponBarcodeView(parentView: parentView!, coupon: coupon)) |
16 | - } | 16 | +// } |
17 | 17 | ||
18 | } | 18 | } |
19 | 19 | ... | ... |
... | @@ -11,8 +11,8 @@ import SwiftUI | ... | @@ -11,8 +11,8 @@ import SwiftUI |
11 | @available(iOS 13.0.0, *) | 11 | @available(iOS 13.0.0, *) |
12 | @objc public class CouponViewInterface : NSObject { | 12 | @objc public class CouponViewInterface : NSObject { |
13 | 13 | ||
14 | - @objc(couponViewController::) static public func couponViewController(parentView: UIView?, coupon: Dictionary<String, Any>) -> UIViewController { | 14 | +// @objc(couponViewController::) static public func couponViewController(parentView: UIView?, coupon: Dictionary<String, Any>) -> UIViewController { |
15 | - return UIHostingController(rootView: CouponView(parentView: parentView!, coupon: coupon)) | 15 | +// return UIHostingController(rootView: CouponView(parentView: parentView!, coupon: coupon)) |
16 | - } | 16 | +// } |
17 | 17 | ||
18 | } | 18 | } | ... | ... |
... | @@ -136,23 +136,29 @@ extension CouponsView { | ... | @@ -136,23 +136,29 @@ extension CouponsView { |
136 | 136 | ||
137 | 137 | ||
138 | var body: some View { | 138 | var body: some View { |
139 | - HStack { | 139 | + HStack(alignment: .center) { |
140 | - Button(action: goBack) { | 140 | + Button { |
141 | - HStack { | 141 | + // Button Action |
142 | - Image("ic_back", bundle: Bundle(for: MyEmptyClass.self)) | 142 | + goBack() |
143 | - .resizable() | 143 | + } label: { |
144 | - .frame(width: self.uiscreen.height * 0.022, height: self.uiscreen.height * 0.04) | 144 | + Image("ic_back", bundle: Bundle(for: MyEmptyClass.self)) |
145 | - .offset(y: self.uiscreen.height * 0.015) | 145 | + .resizable() |
146 | - } | 146 | + .aspectRatio(contentMode: .fit) |
147 | - } | 147 | + .frame(width: self.uiscreen.height * 0.025, height: self.uiscreen.height * 0.02) |
148 | + } | ||
149 | + | ||
148 | Text("Όλα τα κουπόνια μου") | 150 | Text("Όλα τα κουπόνια μου") |
149 | .fontWeight(.medium) | 151 | .fontWeight(.medium) |
152 | + .font(.system(size: 16)) | ||
150 | .foregroundColor(Color(red: 0.20784313725490197, green: 0.3176470588235294, blue: 0.40784313725490196)) | 153 | .foregroundColor(Color(red: 0.20784313725490197, green: 0.3176470588235294, blue: 0.40784313725490196)) |
151 | - .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.025, alignment: .center) | 154 | + .multilineTextAlignment(.center) |
152 | - .offset( y: self.uiscreen.height * 0.02) | 155 | + .frame(maxWidth: .infinity) |
153 | - .font(.system(size: 15)) | 156 | + .padding(.horizontal) |
157 | + | ||
154 | } | 158 | } |
155 | - .frame(width: self.uiscreen.width, height: self.uiscreen.height * 0.1) | 159 | + .frame(maxWidth: .infinity) |
160 | + .padding(.horizontal) | ||
161 | + .padding(.vertical, 10) | ||
156 | } | 162 | } |
157 | } | 163 | } |
158 | 164 | ||
... | @@ -292,7 +298,7 @@ struct CouponsView: View { | ... | @@ -292,7 +298,7 @@ struct CouponsView: View { |
292 | } | 298 | } |
293 | .padding(.top, self.uiscreen.height * 0.05) | 299 | .padding(.top, self.uiscreen.height * 0.05) |
294 | } | 300 | } |
295 | - .frame(width:self.uiscreen.width, height:self.uiscreen.height * 0.9 ) | 301 | + .frame(maxWidth: .infinity, maxHeight: .infinity ) |
296 | .background( | 302 | .background( |
297 | Image("coupons_scrollview", bundle: Bundle(for: MyEmptyClass.self)) | 303 | Image("coupons_scrollview", bundle: Bundle(for: MyEmptyClass.self)) |
298 | .resizable() | 304 | .resizable() | ... | ... |
... | @@ -34,21 +34,29 @@ extension MoreForYouView { | ... | @@ -34,21 +34,29 @@ extension MoreForYouView { |
34 | 34 | ||
35 | 35 | ||
36 | var body: some View { | 36 | var body: some View { |
37 | - HStack { | 37 | + HStack(alignment: .center) { |
38 | - Button(action: goBack) { | 38 | + Button { |
39 | - HStack { | 39 | + // Button Action |
40 | - Image("ic_back", bundle: Bundle(for: MyEmptyClass.self)) | 40 | + goBack() |
41 | - .resizable() | 41 | + } label: { |
42 | - .frame(width: self.uiscreen.height * 0.022, height: self.uiscreen.height * 0.04) | 42 | + Image("ic_back", bundle: Bundle(for: MyEmptyClass.self)) |
43 | - .offset(y: self.uiscreen.height * 0.015) | 43 | + .resizable() |
44 | - } | 44 | + .aspectRatio(contentMode: .fit) |
45 | - } | 45 | + .frame(width: self.uiscreen.height * 0.025, height: self.uiscreen.height * 0.02) |
46 | + } | ||
47 | + | ||
46 | Text("More for you") | 48 | Text("More for you") |
47 | - .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.025, alignment: .center) | 49 | + .fontWeight(.medium) |
48 | - .offset( y: self.uiscreen.height * 0.02) | 50 | + .font(.system(size: 16)) |
49 | - .font(.system(size: 15)) | 51 | + .foregroundColor(Color(red: 0.20784313725490197, green: 0.3176470588235294, blue: 0.40784313725490196)) |
52 | + .multilineTextAlignment(.center) | ||
53 | + .frame(maxWidth: .infinity) | ||
54 | + .padding(.horizontal) | ||
55 | + | ||
50 | } | 56 | } |
51 | - .frame(width: self.uiscreen.width, height: self.uiscreen.height * 0.1) | 57 | + .frame(maxWidth: .infinity) |
58 | + .padding(.horizontal) | ||
59 | + .padding(.vertical, 10) | ||
52 | } | 60 | } |
53 | } | 61 | } |
54 | 62 | ||
... | @@ -168,7 +176,7 @@ struct MoreForYouView: View { | ... | @@ -168,7 +176,7 @@ struct MoreForYouView: View { |
168 | .padding(.top, self.uiscreen.height * 0.04) | 176 | .padding(.top, self.uiscreen.height * 0.04) |
169 | .padding(.bottom, self.uiscreen.height * 0.05) | 177 | .padding(.bottom, self.uiscreen.height * 0.05) |
170 | } | 178 | } |
171 | - .frame(width:self.uiscreen.width, height:self.uiscreen.height * 0.9 ) | 179 | + .frame(maxWidth: .infinity, maxHeight: .infinity ) |
172 | .background( | 180 | .background( |
173 | LinearGradient(gradient: Gradient(colors: [Color(hex: 0x1AADCC), Color(hex: 0x83C062)]), startPoint: .top, endPoint: .bottom) | 181 | LinearGradient(gradient: Gradient(colors: [Color(hex: 0x1AADCC), Color(hex: 0x83C062)]), startPoint: .top, endPoint: .bottom) |
174 | ) | 182 | ) | ... | ... |
... | @@ -18,8 +18,8 @@ | ... | @@ -18,8 +18,8 @@ |
18 | - (void) setToStage; | 18 | - (void) setToStage; |
19 | - (void) setLang:(NSString*) lang; | 19 | - (void) setLang:(NSString*) lang; |
20 | - (UIViewController *) openCoupons:(UIView*) parentView; | 20 | - (UIViewController *) openCoupons:(UIView*) parentView; |
21 | -- (UIViewController *) openCoupon:(UIView*) parentView coupon:(NSDictionary*) coupon; | 21 | +//- (UIViewController *) openCoupon:(UIView*) parentView coupon:(NSDictionary*) coupon; |
22 | -- (UIViewController *) openCouponBarcode:(UIView*) parentView coupon:(NSDictionary*) coupon; | 22 | +//- (UIViewController *) openCouponBarcode:(UIView*) parentView coupon:(NSDictionary*) coupon; |
23 | - (UIViewController *) openGifts:(UIView*) parentView; | 23 | - (UIViewController *) openGifts:(UIView*) parentView; |
24 | - (UIViewController *) openAllGifts:(UIView*) parentView; | 24 | - (UIViewController *) openAllGifts:(UIView*) parentView; |
25 | - (UIViewController *) openOldCoupons:(UIView*) parentView; | 25 | - (UIViewController *) openOldCoupons:(UIView*) parentView; | ... | ... |
... | @@ -53,17 +53,17 @@ NSString *LANG; | ... | @@ -53,17 +53,17 @@ NSString *LANG; |
53 | return couponsViewController; | 53 | return couponsViewController; |
54 | } | 54 | } |
55 | 55 | ||
56 | -- (UIViewController *) openCoupon:(UIView*) parentView coupon:(NSDictionary*) coupon { | 56 | +//- (UIViewController *) openCoupon:(UIView*) parentView coupon:(NSDictionary*) coupon { |
57 | - | 57 | +// |
58 | - UIViewController *couponViewController = [CouponViewInterface couponViewController:parentView :coupon]; | 58 | +// UIViewController *couponViewController = [CouponViewInterface couponViewController:parentView :coupon]; |
59 | - return couponViewController; | 59 | +// return couponViewController; |
60 | -} | 60 | +//} |
61 | - | 61 | +// |
62 | -- (UIViewController *) openCouponBarcode:(UIView*) parentView coupon:(NSDictionary*) coupon { | 62 | +//- (UIViewController *) openCouponBarcode:(UIView*) parentView coupon:(NSDictionary*) coupon { |
63 | - | 63 | +// |
64 | - UIViewController *couponBarcodeViewController = [CouponBarcodeViewInterface couponBarcodeViewController:parentView :coupon]; | 64 | +// UIViewController *couponBarcodeViewController = [CouponBarcodeViewInterface couponBarcodeViewController:parentView :coupon]; |
65 | - return couponBarcodeViewController; | 65 | +// return couponBarcodeViewController; |
66 | -} | 66 | +//} |
67 | 67 | ||
68 | - (UIViewController *) openGifts:(UIView*) parentView{ | 68 | - (UIViewController *) openGifts:(UIView*) parentView{ |
69 | 69 | ... | ... |
... | @@ -39,21 +39,29 @@ extension WalletView { | ... | @@ -39,21 +39,29 @@ extension WalletView { |
39 | 39 | ||
40 | 40 | ||
41 | var body: some View { | 41 | var body: some View { |
42 | - HStack { | 42 | + HStack(alignment: .center) { |
43 | - Button(action: goBack) { | 43 | + Button { |
44 | - HStack { | 44 | + // Button Action |
45 | - Image("ic_back", bundle: Bundle(for: MyEmptyClass.self)) | 45 | + goBack() |
46 | - .resizable() | 46 | + } label: { |
47 | - .frame(width: self.uiscreen.height * 0.022, height: self.uiscreen.height * 0.02) | 47 | + Image("ic_back", bundle: Bundle(for: MyEmptyClass.self)) |
48 | - .offset(y: self.uiscreen.height * 0.015) | 48 | + .resizable() |
49 | - } | 49 | + .aspectRatio(contentMode: .fit) |
50 | - } | 50 | + .frame(width: self.uiscreen.height * 0.025, height: self.uiscreen.height * 0.02) |
51 | + } | ||
52 | + | ||
51 | Text("My loyalty wallet") | 53 | Text("My loyalty wallet") |
52 | - .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.025, alignment: .center) | 54 | + .fontWeight(.medium) |
53 | - .offset( y: self.uiscreen.height * 0.02) | 55 | + .font(.system(size: 16)) |
54 | - .font(.system(size: 15)) | 56 | + .foregroundColor(Color(red: 0.20784313725490197, green: 0.3176470588235294, blue: 0.40784313725490196)) |
57 | + .multilineTextAlignment(.center) | ||
58 | + .frame(maxWidth: .infinity) | ||
59 | + .padding(.horizontal) | ||
60 | + | ||
55 | } | 61 | } |
56 | - .frame(width: self.uiscreen.width, height: self.uiscreen.height * 0.1) | 62 | + .frame(maxWidth: .infinity) |
63 | + .padding(.horizontal) | ||
64 | + .padding(.vertical, 10) | ||
57 | } | 65 | } |
58 | } | 66 | } |
59 | 67 | ||
... | @@ -329,7 +337,7 @@ struct WalletView: View { | ... | @@ -329,7 +337,7 @@ struct WalletView: View { |
329 | ScrollView(showsIndicators: false) { | 337 | ScrollView(showsIndicators: false) { |
330 | linearView(data: data) | 338 | linearView(data: data) |
331 | } | 339 | } |
332 | - .frame(width:self.uiscreen.width, height:self.uiscreen.height * 0.78 ) | 340 | + .frame(maxWidth: .infinity, maxHeight: .infinity ) |
333 | 341 | ||
334 | } | 342 | } |
335 | .frame(width:self.uiscreen.width, height:self.uiscreen.height ) | 343 | .frame(width:self.uiscreen.width, height:self.uiscreen.height ) | ... | ... |
-
Please register or login to post a comment