11
|
1 //
|
|
2 // BuyPremiumModalView.swift
|
|
3 // GeoQuiz
|
|
4 //
|
|
5 // Created by Dennis Concepción Martín on 9/10/22.
|
|
6 //
|
|
7
|
|
8 import SwiftUI
|
|
9
|
|
10 struct BuyPremiumModalView: View {
|
|
11 @Environment(\.dismiss) var dismiss
|
|
12
|
|
13 var body: some View {
|
|
14 NavigationView {
|
|
15 ScrollView(showsIndicators: false) {
|
|
16 VStack(alignment: .center, spacing: 20) {
|
|
17 VStack(spacing: 20) {
|
|
18 Text("Unlock Premium 🤩")
|
|
19 .font(.largeTitle.bold())
|
|
20
|
|
21 Text("Unlock three more game modes to become a geography master and support the future development of GeoQuiz.")
|
|
22 .foregroundColor(.secondary)
|
|
23 .multilineTextAlignment(.center)
|
|
24 .frame(maxWidth: 400)
|
|
25 }
|
|
26 .padding()
|
|
27
|
|
28 ScrollView(.horizontal, showsIndicators: false) {
|
|
29 HStack(spacing: 20) {
|
|
30 Group {
|
|
31 Image("GuessTheCapital")
|
|
32 .resizable()
|
|
33
|
|
34 Image("GuessTheCountry")
|
|
35 .resizable()
|
|
36
|
|
37 Image("GuessThePopulation")
|
|
38 .resizable()
|
|
39 }
|
|
40 .scaledToFit()
|
|
41 .cornerRadius(25)
|
|
42 .frame(height: 500)
|
|
43 }
|
|
44 .padding()
|
|
45 }
|
|
46
|
|
47 VStack(spacing: 10) {
|
|
48 Text("A one-time payment.")
|
|
49 .font(.title)
|
|
50 .fontWeight(.semibold)
|
|
51
|
|
52 Text("No subscriptions.")
|
|
53 .font(.title2)
|
|
54 .fontWeight(.semibold)
|
|
55 .foregroundColor(.secondary)
|
|
56
|
|
57 Button {
|
|
58 // Buy
|
|
59 } label: {
|
|
60 Text("Buy for $2.99")
|
|
61 .font(.headline)
|
|
62 .padding()
|
|
63 }
|
|
64 .buttonStyle(.borderedProminent)
|
|
65 .padding(.top)
|
|
66 }
|
|
67 .padding()
|
|
68
|
|
69 VStack {
|
|
70 Text("GeoQuiz is an indie game")
|
|
71 Text("I appreciate your support ❤️")
|
|
72 }
|
|
73 .font(.callout)
|
|
74 .foregroundColor(.secondary)
|
|
75 }
|
|
76 }
|
|
77 .navigationBarTitleDisplayMode(.inline)
|
|
78 .toolbar {
|
|
79 ToolbarItem(placement: .cancellationAction) {
|
|
80 Button {
|
|
81 dismiss()
|
|
82 } label: {
|
|
83 Label("Exit", systemImage: "multiply")
|
|
84 }
|
|
85 }
|
|
86 }
|
|
87 }
|
|
88 }
|
|
89 }
|
|
90
|
|
91 struct BuyPremiumModalView_Previews: PreviewProvider {
|
|
92 static var previews: some View {
|
|
93 BuyPremiumModalView()
|
|
94 }
|
|
95 }
|