Mercurial > public > simoleon
comparison Simoleon/Subscription.swift @ 28:4f862c618b44
Implemented RevenueCat
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Thu, 22 Jul 2021 19:06:01 +0100 |
parents | |
children | c52966834f83 |
comparison
equal
deleted
inserted
replaced
27:d95582268b44 | 28:4f862c618b44 |
---|---|
1 // | |
2 // Subscription.swift | |
3 // Simoleon | |
4 // | |
5 // Created by Dennis Concepción Martín on 22/07/2021. | |
6 // | |
7 | |
8 import SwiftUI | |
9 | |
10 struct Subscription: View { | |
11 @Binding var showingSubscriptionPaywall: Bool | |
12 | |
13 var body: some View { | |
14 NavigationView { | |
15 ScrollView { | |
16 VStack(alignment: .leading, spacing: 20) { | |
17 HStack { | |
18 Spacer() | |
19 VStack { | |
20 Image("Subscription") | |
21 .resizable() | |
22 .aspectRatio(contentMode: .fit) | |
23 .frame(width: 100, height: 100) | |
24 .cornerRadius(25) | |
25 | |
26 Text("Unlock all access") | |
27 .font(.title) | |
28 .fontWeight(.semibold) | |
29 .padding(.top) | |
30 } | |
31 | |
32 Spacer() | |
33 } | |
34 | |
35 Divider() | |
36 | |
37 SubscriptionFeature( | |
38 symbol: "star.circle.fill", | |
39 title: "Favourite currencies", | |
40 text: "Save your favourite currencies to access them quickly.", | |
41 colour: Color(.systemYellow) | |
42 ) | |
43 | |
44 SubscriptionFeature( | |
45 symbol: "flag.circle.fill", | |
46 title: "Over 170 currencies", | |
47 text: "Have access to almost every currency of the world.", | |
48 colour: Color(.systemRed) | |
49 ) | |
50 | |
51 SubscriptionFeature( | |
52 symbol: "icloud.circle.fill", | |
53 title: "Simoleon on all your devices", | |
54 text: "Your settings and favourite currencies in all your devices.", | |
55 colour: Color(.systemBlue) | |
56 ) | |
57 | |
58 SubscriptionFeature( | |
59 symbol: "bitcoinsign.circle.fill", | |
60 title: "Cryptos and commodities", | |
61 text: "Convert your currency between cryptos, gold, and silver.", | |
62 colour: Color(.systemOrange) | |
63 ) | |
64 Spacer() | |
65 SubscribeButton(showingSubscriptionPaywall: $showingSubscriptionPaywall) | |
66 HStack { | |
67 Spacer() | |
68 RestoreButton(showingSubscriptionPaywall: $showingSubscriptionPaywall) | |
69 Spacer() | |
70 } | |
71 | |
72 } | |
73 .padding(.bottom) | |
74 .padding(.horizontal, 40) | |
75 } | |
76 .toolbar { | |
77 ToolbarItem(placement: .cancellationAction) { | |
78 Button("Cancel", action: { showingSubscriptionPaywall = false }) | |
79 } | |
80 } | |
81 } | |
82 } | |
83 } | |
84 | |
85 struct Subscription_Previews: PreviewProvider { | |
86 static var previews: some View { | |
87 Subscription(showingSubscriptionPaywall: .constant(false)) | |
88 } | |
89 } |