comparison GeoQuiz/GuessThePopulationView.swift @ 15:f1967f8cc67b

first iteration of core data
author Dennis C. M. <dennis@denniscm.com>
date Wed, 19 Oct 2022 10:04:17 +0200
parents a793f33f05fb
children f140bb277c96
comparison
equal deleted inserted replaced
14:136928bae534 15:f1967f8cc67b
7 7
8 import SwiftUI 8 import SwiftUI
9 9
10 struct GuessThePopulationView: View { 10 struct GuessThePopulationView: View {
11 @StateObject var game = CountryGame() 11 @StateObject var game = CountryGame()
12
13 @Environment(\.managedObjectContext) var moc
12 14
13 var body: some View { 15 var body: some View {
14 ZStack { 16 ZStack {
15 LinearGradient(gradient: .quaternary, startPoint: .top, endPoint: .bottom) 17 LinearGradient(gradient: .quaternary, startPoint: .top, endPoint: .bottom)
16 .ignoresSafeArea() 18 .ignoresSafeArea()
61 } 63 }
62 .padding() 64 .padding()
63 } 65 }
64 } 66 }
65 .navigationBarHidden(true) 67 .navigationBarHidden(true)
66 .modifier(GameAlertsModifier(game: game)) 68 .modifier(GameAlertsModifier(game: game, gameType: .guessThePopulation, moc: moc))
67 } 69 }
68 } 70 }
69 71
70 struct GuessThePopulationView_Previews: PreviewProvider { 72 struct GuessThePopulationView_Previews: PreviewProvider {
71 static var previews: some View { 73 static var previews: some View {