comparison GeoQuiz/GuessTheFlagView.swift @ 8:e09959b4e4a8

fix bugs
author Dennis C. M. <dennis@denniscm.com>
date Thu, 06 Oct 2022 11:14:34 +0200
parents d945e52b0704
children a793f33f05fb
comparison
equal deleted inserted replaced
7:d945e52b0704 8:e09959b4e4a8
36 36
37 Spacer() 37 Spacer()
38 38
39 ForEach(Array(game.userChoices.keys), id: \.self) { countryName in 39 ForEach(Array(game.userChoices.keys), id: \.self) { countryName in
40 Button { 40 Button {
41 game.answer((key: countryName, value: game.data[countryName]!)) 41 game.answer((key: countryName, value: game.data[countryName]!)) {
42 game.selector()
43 }
42 } label: { 44 } label: {
43 FlagImage(flagSymbol: game.data[countryName]!.flag, cornerRadius: 20) 45 FlagImage(flagSymbol: game.data[countryName]!.flag, cornerRadius: 20)
44 .shadow(radius: 10) 46 .shadow(radius: 10)
45 .frame(height: geo.size.height * 0.15) 47 .frame(height: geo.size.height * 0.15)
46 } 48 }