Showing
10 changed files
with
212 additions
and
1 deletions
... | @@ -15,6 +15,11 @@ | ... | @@ -15,6 +15,11 @@ |
15 | E639EFA52808244E00B9DD94 /* MyEmptyClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = E639EFA42808244E00B9DD94 /* MyEmptyClass.swift */; }; | 15 | E639EFA52808244E00B9DD94 /* MyEmptyClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = E639EFA42808244E00B9DD94 /* MyEmptyClass.swift */; }; |
16 | E639EFAB2808347700B9DD94 /* ic_back.png in Resources */ = {isa = PBXBuildFile; fileRef = E639EFAA2808347700B9DD94 /* ic_back.png */; }; | 16 | E639EFAB2808347700B9DD94 /* ic_back.png in Resources */ = {isa = PBXBuildFile; fileRef = E639EFAA2808347700B9DD94 /* ic_back.png */; }; |
17 | E655D05A280590AD004F913C /* WarplySDKFrameworkIOS-Bridging-Header.h in Headers */ = {isa = PBXBuildFile; fileRef = E655D05928058A72004F913C /* WarplySDKFrameworkIOS-Bridging-Header.h */; }; | 17 | E655D05A280590AD004F913C /* WarplySDKFrameworkIOS-Bridging-Header.h in Headers */ = {isa = PBXBuildFile; fileRef = E655D05928058A72004F913C /* WarplySDKFrameworkIOS-Bridging-Header.h */; }; |
18 | + E67D1EB8281055D900940F01 /* WalletViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = E67D1EB7281055D900940F01 /* WalletViewInterface.swift */; }; | ||
19 | + E67D1EBA281055F800940F01 /* MoreForYouViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = E67D1EB9281055F800940F01 /* MoreForYouViewInterface.swift */; }; | ||
20 | + E67D1EBC2810560800940F01 /* CampaignViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = E67D1EBB2810560800940F01 /* CampaignViewInterface.swift */; }; | ||
21 | + E67D1EBE2810573900940F01 /* WalletView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E67D1EBD2810573900940F01 /* WalletView.swift */; }; | ||
22 | + E67D1EC02810579F00940F01 /* MoreForYouView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E67D1EBF2810579F00940F01 /* MoreForYouView.swift */; }; | ||
18 | E6D8DE6D27A942010006A3A9 /* WarplySDKFrameworkIOS.docc in Sources */ = {isa = PBXBuildFile; fileRef = E6D8DE6C27A942010006A3A9 /* WarplySDKFrameworkIOS.docc */; }; | 23 | E6D8DE6D27A942010006A3A9 /* WarplySDKFrameworkIOS.docc in Sources */ = {isa = PBXBuildFile; fileRef = E6D8DE6C27A942010006A3A9 /* WarplySDKFrameworkIOS.docc */; }; |
19 | E6D8DE6E27A942010006A3A9 /* WarplySDKFrameworkIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = E6D8DE6B27A942010006A3A9 /* WarplySDKFrameworkIOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; | 24 | E6D8DE6E27A942010006A3A9 /* WarplySDKFrameworkIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = E6D8DE6B27A942010006A3A9 /* WarplySDKFrameworkIOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
20 | E6D8DEEE27A942920006A3A9 /* WarplyReactMethods.m in Sources */ = {isa = PBXBuildFile; fileRef = E6D8DE7527A942910006A3A9 /* WarplyReactMethods.m */; }; | 25 | E6D8DEEE27A942920006A3A9 /* WarplyReactMethods.m in Sources */ = {isa = PBXBuildFile; fileRef = E6D8DE7527A942910006A3A9 /* WarplyReactMethods.m */; }; |
... | @@ -142,6 +147,11 @@ | ... | @@ -142,6 +147,11 @@ |
142 | E639EFA42808244E00B9DD94 /* MyEmptyClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyEmptyClass.swift; sourceTree = "<group>"; }; | 147 | E639EFA42808244E00B9DD94 /* MyEmptyClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyEmptyClass.swift; sourceTree = "<group>"; }; |
143 | E639EFAA2808347700B9DD94 /* ic_back.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ic_back.png; sourceTree = "<group>"; }; | 148 | E639EFAA2808347700B9DD94 /* ic_back.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ic_back.png; sourceTree = "<group>"; }; |
144 | E655D05928058A72004F913C /* WarplySDKFrameworkIOS-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WarplySDKFrameworkIOS-Bridging-Header.h"; sourceTree = "<group>"; }; | 149 | E655D05928058A72004F913C /* WarplySDKFrameworkIOS-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WarplySDKFrameworkIOS-Bridging-Header.h"; sourceTree = "<group>"; }; |
150 | + E67D1EB7281055D900940F01 /* WalletViewInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalletViewInterface.swift; sourceTree = "<group>"; }; | ||
151 | + E67D1EB9281055F800940F01 /* MoreForYouViewInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoreForYouViewInterface.swift; sourceTree = "<group>"; }; | ||
152 | + E67D1EBB2810560800940F01 /* CampaignViewInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CampaignViewInterface.swift; sourceTree = "<group>"; }; | ||
153 | + E67D1EBD2810573900940F01 /* WalletView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalletView.swift; sourceTree = "<group>"; }; | ||
154 | + E67D1EBF2810579F00940F01 /* MoreForYouView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoreForYouView.swift; sourceTree = "<group>"; }; | ||
145 | E6D8DE6827A942010006A3A9 /* WarplySDKFrameworkIOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WarplySDKFrameworkIOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | 155 | E6D8DE6827A942010006A3A9 /* WarplySDKFrameworkIOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WarplySDKFrameworkIOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
146 | E6D8DE6B27A942010006A3A9 /* WarplySDKFrameworkIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WarplySDKFrameworkIOS.h; sourceTree = "<group>"; }; | 156 | E6D8DE6B27A942010006A3A9 /* WarplySDKFrameworkIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WarplySDKFrameworkIOS.h; sourceTree = "<group>"; }; |
147 | E6D8DE6C27A942010006A3A9 /* WarplySDKFrameworkIOS.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = WarplySDKFrameworkIOS.docc; sourceTree = "<group>"; }; | 157 | E6D8DE6C27A942010006A3A9 /* WarplySDKFrameworkIOS.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = WarplySDKFrameworkIOS.docc; sourceTree = "<group>"; }; |
... | @@ -324,6 +334,11 @@ | ... | @@ -324,6 +334,11 @@ |
324 | E639EFA1280810E300B9DD94 /* CouponsViewInterface.swift */, | 334 | E639EFA1280810E300B9DD94 /* CouponsViewInterface.swift */, |
325 | 1EBEB02C280D69D800BF802C /* GiftsView.swift */, | 335 | 1EBEB02C280D69D800BF802C /* GiftsView.swift */, |
326 | 1EBEB02E280D6AA500BF802C /* GiftsViewInterface.swift */, | 336 | 1EBEB02E280D6AA500BF802C /* GiftsViewInterface.swift */, |
337 | + E67D1EB7281055D900940F01 /* WalletViewInterface.swift */, | ||
338 | + E67D1EBD2810573900940F01 /* WalletView.swift */, | ||
339 | + E67D1EB9281055F800940F01 /* MoreForYouViewInterface.swift */, | ||
340 | + E67D1EBF2810579F00940F01 /* MoreForYouView.swift */, | ||
341 | + E67D1EBB2810560800940F01 /* CampaignViewInterface.swift */, | ||
327 | E6D8DF5E27A9429E0006A3A9 /* MyApi.h */, | 342 | E6D8DF5E27A9429E0006A3A9 /* MyApi.h */, |
328 | E6D8DF5C27A9429E0006A3A9 /* MyApi.m */, | 343 | E6D8DF5C27A9429E0006A3A9 /* MyApi.m */, |
329 | E6D8DE7427A942910006A3A9 /* Helpers */, | 344 | E6D8DE7427A942910006A3A9 /* Helpers */, |
... | @@ -721,21 +736,25 @@ | ... | @@ -721,21 +736,25 @@ |
721 | isa = PBXSourcesBuildPhase; | 736 | isa = PBXSourcesBuildPhase; |
722 | buildActionMask = 2147483647; | 737 | buildActionMask = 2147483647; |
723 | files = ( | 738 | files = ( |
739 | + E67D1EBC2810560800940F01 /* CampaignViewInterface.swift in Sources */, | ||
724 | E6D8DF0B27A942920006A3A9 /* WLEvent.m in Sources */, | 740 | E6D8DF0B27A942920006A3A9 /* WLEvent.m in Sources */, |
725 | E6D8DF1E27A942920006A3A9 /* UIViewController+WLAdditions.m in Sources */, | 741 | E6D8DF1E27A942920006A3A9 /* UIViewController+WLAdditions.m in Sources */, |
726 | E6D8DF2E27A942920006A3A9 /* UIRefreshControl+AFNetworking.m in Sources */, | 742 | E6D8DF2E27A942920006A3A9 /* UIRefreshControl+AFNetworking.m in Sources */, |
727 | E6D8DF4827A942920006A3A9 /* AFURLRequestSerialization.m in Sources */, | 743 | E6D8DF4827A942920006A3A9 /* AFURLRequestSerialization.m in Sources */, |
728 | E6D8DEF327A942920006A3A9 /* WLNativeVideoTableViewCell.m in Sources */, | 744 | E6D8DEF327A942920006A3A9 /* WLNativeVideoTableViewCell.m in Sources */, |
729 | E6D8DF2527A942920006A3A9 /* WLSMSActionHanlder.m in Sources */, | 745 | E6D8DF2527A942920006A3A9 /* WLSMSActionHanlder.m in Sources */, |
746 | + E67D1EBE2810573900940F01 /* WalletView.swift in Sources */, | ||
730 | E6D8DF5727A942920006A3A9 /* FMResultSet.m in Sources */, | 747 | E6D8DF5727A942920006A3A9 /* FMResultSet.m in Sources */, |
731 | E6D8DF3A27A942920006A3A9 /* UIButton+AFNetworking.m in Sources */, | 748 | E6D8DF3A27A942920006A3A9 /* UIButton+AFNetworking.m in Sources */, |
732 | E6D8DF0627A942920006A3A9 /* WLBeacon.m in Sources */, | 749 | E6D8DF0627A942920006A3A9 /* WLBeacon.m in Sources */, |
733 | E6D8DF2927A942920006A3A9 /* NSData+SSToolkitAdditions.m in Sources */, | 750 | E6D8DF2927A942920006A3A9 /* NSData+SSToolkitAdditions.m in Sources */, |
734 | 1EBEB02D280D69D800BF802C /* GiftsView.swift in Sources */, | 751 | 1EBEB02D280D69D800BF802C /* GiftsView.swift in Sources */, |
752 | + E67D1EC02810579F00940F01 /* MoreForYouView.swift in Sources */, | ||
735 | E6D8DEFC27A942920006A3A9 /* WLCustomNativeAdTableViewCell.m in Sources */, | 753 | E6D8DEFC27A942920006A3A9 /* WLCustomNativeAdTableViewCell.m in Sources */, |
736 | E6EA2F702806E8C200EC4CF5 /* Coupons.swift in Sources */, | 754 | E6EA2F702806E8C200EC4CF5 /* Coupons.swift in Sources */, |
737 | E639EFA3280810E300B9DD94 /* CouponsViewInterface.swift in Sources */, | 755 | E639EFA3280810E300B9DD94 /* CouponsViewInterface.swift in Sources */, |
738 | 1EBEB02F280D6AA500BF802C /* GiftsViewInterface.swift in Sources */, | 756 | 1EBEB02F280D6AA500BF802C /* GiftsViewInterface.swift in Sources */, |
757 | + E67D1EBA281055F800940F01 /* MoreForYouViewInterface.swift in Sources */, | ||
739 | E6D8DF4A27A942920006A3A9 /* AFNetworkReachabilityManager.m in Sources */, | 758 | E6D8DF4A27A942920006A3A9 /* AFNetworkReachabilityManager.m in Sources */, |
740 | E6D8DF4B27A942920006A3A9 /* AFSecurityPolicy.m in Sources */, | 759 | E6D8DF4B27A942920006A3A9 /* AFSecurityPolicy.m in Sources */, |
741 | E6D8DF1327A942920006A3A9 /* WLBeaconManager.m in Sources */, | 760 | E6D8DF1327A942920006A3A9 /* WLBeaconManager.m in Sources */, |
... | @@ -746,6 +765,7 @@ | ... | @@ -746,6 +765,7 @@ |
746 | E6D8DF4527A942920006A3A9 /* AFHTTPSessionManager.m in Sources */, | 765 | E6D8DF4527A942920006A3A9 /* AFHTTPSessionManager.m in Sources */, |
747 | E6D8DF3B27A942920006A3A9 /* UIActivityIndicatorView+AFNetworking.m in Sources */, | 766 | E6D8DF3B27A942920006A3A9 /* UIActivityIndicatorView+AFNetworking.m in Sources */, |
748 | E6D8DF3727A942920006A3A9 /* UIImageView+AFNetworking.m in Sources */, | 767 | E6D8DF3727A942920006A3A9 /* UIImageView+AFNetworking.m in Sources */, |
768 | + E67D1EB8281055D900940F01 /* WalletViewInterface.swift in Sources */, | ||
749 | E6D8DF3127A942920006A3A9 /* AFNetworkActivityIndicatorManager.m in Sources */, | 769 | E6D8DF3127A942920006A3A9 /* AFNetworkActivityIndicatorManager.m in Sources */, |
750 | E6D8DF3D27A942920006A3A9 /* AFAutoPurgingImageCache.m in Sources */, | 770 | E6D8DF3D27A942920006A3A9 /* AFAutoPurgingImageCache.m in Sources */, |
751 | E6D8DF0A27A942920006A3A9 /* WLAPSItem.m in Sources */, | 771 | E6D8DF0A27A942920006A3A9 /* WLAPSItem.m in Sources */, | ... | ... |
No preview for this file type
1 | +// | ||
2 | +// CampaignViewInterface.swift | ||
3 | +// WarplySDKFrameworkIOS | ||
4 | +// | ||
5 | +// Created by Βασιλης Σκουρας on 20/4/22. | ||
6 | +// | ||
7 | + | ||
8 | +import Foundation | ||
9 | +import SwiftUI | ||
10 | + | ||
11 | +@available(iOS 13.0.0, *) | ||
12 | +@objc public class CampaignViewInterface : NSObject { | ||
13 | + | ||
14 | + @objc(campaignViewController::) static public func campaignViewController(parentView: UIView?, campaign: String?) -> UIViewController { | ||
15 | + return UIHostingController(rootView: CampaignWebview(parentView: parentView!, campaign: campaign)) | ||
16 | + } | ||
17 | + | ||
18 | +} |
... | @@ -192,7 +192,7 @@ extension CouponsView { | ... | @@ -192,7 +192,7 @@ extension CouponsView { |
192 | Image("coupons_container", bundle: Bundle(for: MyEmptyClass.self)) | 192 | Image("coupons_container", bundle: Bundle(for: MyEmptyClass.self)) |
193 | .resizable() | 193 | .resizable() |
194 | ) | 194 | ) |
195 | - .padding(.bottom, self.uiscreen.height * 0.04) | 195 | + .padding(.bottom, self.uiscreen.height * 0.03) |
196 | 196 | ||
197 | } | 197 | } |
198 | } | 198 | } | ... | ... |
1 | +// | ||
2 | +// MoreForYouView.swift | ||
3 | +// WarplySDKFrameworkIOS | ||
4 | +// | ||
5 | +// Created by Βασιλης Σκουρας on 20/4/22. | ||
6 | +// | ||
7 | + | ||
8 | +import SwiftUI | ||
9 | + | ||
10 | +extension MoreForYouView { | ||
11 | + struct headerView: View { | ||
12 | + var goBack: () -> () | ||
13 | + var uiscreen = UIScreen.main.bounds | ||
14 | + | ||
15 | + | ||
16 | + var body: some View { | ||
17 | + HStack { | ||
18 | + Button(action: goBack) { | ||
19 | + HStack { | ||
20 | + Image("ic_back", bundle: Bundle(for: MyEmptyClass.self)) | ||
21 | + .resizable() | ||
22 | + .frame(width: self.uiscreen.height * 0.022, height: self.uiscreen.height * 0.02) | ||
23 | + .offset(y: self.uiscreen.height * 0.015) | ||
24 | + } | ||
25 | + } | ||
26 | + Text("More for you") | ||
27 | + .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.025, alignment: .center) | ||
28 | + .offset( y: self.uiscreen.height * 0.02) | ||
29 | + .font(.system(size: 15)) | ||
30 | + } | ||
31 | + .frame(width: self.uiscreen.width, height: self.uiscreen.height * 0.1) | ||
32 | + } | ||
33 | + } | ||
34 | +} | ||
35 | + | ||
36 | +struct MoreForYouView: View { | ||
37 | + | ||
38 | + var parentView: UIView | ||
39 | + | ||
40 | + var uiscreen = UIScreen.main.bounds | ||
41 | + | ||
42 | + func goBack(){ | ||
43 | + for subview in parentView.subviews { | ||
44 | + if(subview.tag == 1) { | ||
45 | + subview.removeFromSuperview() | ||
46 | + } | ||
47 | + } | ||
48 | + } | ||
49 | + | ||
50 | + var body: some View { | ||
51 | + headerView(goBack: goBack) | ||
52 | + Text("More For you") | ||
53 | + } | ||
54 | +} | ||
55 | + | ||
56 | +//struct MoreForYouView_Previews: PreviewProvider { | ||
57 | +// static var previews: some View { | ||
58 | +// MoreForYouView() | ||
59 | +// } | ||
60 | +//} |
1 | +// | ||
2 | +// MoreForYouViewInterface.swift | ||
3 | +// WarplySDKFrameworkIOS | ||
4 | +// | ||
5 | +// Created by Βασιλης Σκουρας on 20/4/22. | ||
6 | +// | ||
7 | + | ||
8 | +import Foundation | ||
9 | +import SwiftUI | ||
10 | + | ||
11 | +@available(iOS 13.0.0, *) | ||
12 | +@objc public class MoreForYouViewInterface : NSObject { | ||
13 | + | ||
14 | + @objc(moreForYouViewController:) static public func moreForYouViewController(parentView: UIView?) -> UIViewController { | ||
15 | + return UIHostingController(rootView: MoreForYouView(parentView: parentView!)) | ||
16 | + } | ||
17 | + | ||
18 | +} |
... | @@ -17,6 +17,9 @@ | ... | @@ -17,6 +17,9 @@ |
17 | - (void) setLang:(NSString*) lang; | 17 | - (void) setLang:(NSString*) lang; |
18 | - (UIViewController *) openCoupons:(UIView*) parentView; | 18 | - (UIViewController *) openCoupons:(UIView*) parentView; |
19 | - (UIViewController *) openGifts:(UIView*) parentView; | 19 | - (UIViewController *) openGifts:(UIView*) parentView; |
20 | +- (UIViewController *) openWallet:(UIView*) parentView; | ||
21 | +- (UIViewController *) openMoreForYou:(UIView*) parentView; | ||
22 | +- (UIViewController *) openCampaign:(UIView*) parentView campaign:(NSString*) campaign; | ||
20 | - (void) applicationDidEnterBackground:(UIApplication *)application; | 23 | - (void) applicationDidEnterBackground:(UIApplication *)application; |
21 | - (void) applicationWillEnterForeground:(UIApplication *)application; | 24 | - (void) applicationWillEnterForeground:(UIApplication *)application; |
22 | - (void) applicationDidBecomeActive:(UIApplication *)application; | 25 | - (void) applicationDidBecomeActive:(UIApplication *)application; | ... | ... |
... | @@ -58,6 +58,21 @@ NSString *LANG; | ... | @@ -58,6 +58,21 @@ NSString *LANG; |
58 | return giftsViewController; | 58 | return giftsViewController; |
59 | } | 59 | } |
60 | 60 | ||
61 | +- (UIViewController *) openWallet:(UIView*) parentView{ | ||
62 | + | ||
63 | + UIViewController *wallletViewController = [WalletViewInterface walletViewController:parentView]; | ||
64 | + return wallletViewController; | ||
65 | +} | ||
66 | + | ||
67 | +- (UIViewController *) openMoreForYou:(UIView*) parentView{ | ||
68 | + UIViewController *moreForYouViewController = [MoreForYouViewInterface moreForYouViewController:parentView]; | ||
69 | + return moreForYouViewController; | ||
70 | +} | ||
71 | + | ||
72 | +- (UIViewController *) openCampaign:(UIView*) parentView campaign:(NSString*) campaign; { | ||
73 | + UIViewController *campaignViewController = [CampaignViewInterface campaignViewController:parentView :campaign]; | ||
74 | + return campaignViewController; | ||
75 | +} | ||
61 | 76 | ||
62 | /////////////////////////////////////////////////////////////////////////////////////////////////// | 77 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
63 | - (void)applicationDidEnterBackground:(UIApplication *)application | 78 | - (void)applicationDidEnterBackground:(UIApplication *)application | ... | ... |
1 | +// | ||
2 | +// WalletView.swift | ||
3 | +// WarplySDKFrameworkIOS | ||
4 | +// | ||
5 | +// Created by Βασιλης Σκουρας on 20/4/22. | ||
6 | +// | ||
7 | + | ||
8 | +import SwiftUI | ||
9 | + | ||
10 | +extension WalletView { | ||
11 | + struct headerView: View { | ||
12 | + var goBack: () -> () | ||
13 | + var uiscreen = UIScreen.main.bounds | ||
14 | + | ||
15 | + | ||
16 | + var body: some View { | ||
17 | + HStack { | ||
18 | + Button(action: goBack) { | ||
19 | + HStack { | ||
20 | + Image("ic_back", bundle: Bundle(for: MyEmptyClass.self)) | ||
21 | + .resizable() | ||
22 | + .frame(width: self.uiscreen.height * 0.022, height: self.uiscreen.height * 0.02) | ||
23 | + .offset(y: self.uiscreen.height * 0.015) | ||
24 | + } | ||
25 | + } | ||
26 | + Text("Wallet") | ||
27 | + .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.025, alignment: .center) | ||
28 | + .offset( y: self.uiscreen.height * 0.02) | ||
29 | + .font(.system(size: 15)) | ||
30 | + } | ||
31 | + .frame(width: self.uiscreen.width, height: self.uiscreen.height * 0.1) | ||
32 | + } | ||
33 | + } | ||
34 | +} | ||
35 | + | ||
36 | +struct WalletView: View { | ||
37 | + var parentView: UIView | ||
38 | + | ||
39 | + var uiscreen = UIScreen.main.bounds | ||
40 | + | ||
41 | + func goBack(){ | ||
42 | + for subview in parentView.subviews { | ||
43 | + if(subview.tag == 1) { | ||
44 | + subview.removeFromSuperview() | ||
45 | + } | ||
46 | + } | ||
47 | + } | ||
48 | + | ||
49 | + var body: some View { | ||
50 | + headerView(goBack: goBack) | ||
51 | + Text("Wallet View") | ||
52 | + } | ||
53 | +} | ||
54 | + | ||
55 | +struct WalletView_Previews: PreviewProvider { | ||
56 | + static var previews: some View { | ||
57 | + WalletView() | ||
58 | + } | ||
59 | +} |
1 | +// | ||
2 | +// WalletViewInterface.swift | ||
3 | +// WarplySDKFrameworkIOS | ||
4 | +// | ||
5 | +// Created by Βασιλης Σκουρας on 20/4/22. | ||
6 | +// | ||
7 | + | ||
8 | +import Foundation | ||
9 | +import SwiftUI | ||
10 | + | ||
11 | +@available(iOS 13.0.0, *) | ||
12 | +@objc public class WalletViewInterface : NSObject { | ||
13 | + | ||
14 | + @objc(walletViewController:) static public func walletViewController(parentView: UIView?) -> UIViewController { | ||
15 | + return UIHostingController(rootView: WalletView(parentView: parentView!)) | ||
16 | + } | ||
17 | + | ||
18 | +} |
-
Please register or login to post a comment