Mercurial > public > geoquiz
diff GeoQuiz/ContentView.swift @ 10:a793f33f05fb
refactor code and fix layout
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Sat, 08 Oct 2022 21:36:40 +0200 |
parents | e09959b4e4a8 |
children | 039b26a99a48 |
line wrap: on
line diff
--- a/GeoQuiz/ContentView.swift Fri Oct 07 18:50:38 2022 +0200 +++ b/GeoQuiz/ContentView.swift Sat Oct 08 21:36:40 2022 +0200 @@ -14,7 +14,11 @@ var body: some View { NavigationView { ScrollView(showsIndicators: false) { - VStack(spacing: 20) { + VStack(alignment: .leading, spacing: 20) { + + Text("Select a game 🎮") + .font(.largeTitle.bold()) + .padding(.bottom) NavigationLink(destination: GuessTheFlagView()) { GameButton( @@ -36,21 +40,18 @@ level: "Level 3", symbol: "globe.americas.fill", name: "Guess the country" ) } - -// NavigationLink( -// destination: Text("Guess the population"), -// tag: GameName.guessThePopulation, -// selection: $gameName -// ) { -// GameButton( -// gradient: .quaternary, -// level: "Level 4", symbol: "person.3.fill", name: "Guess the population" -// ) -// } + + NavigationLink(destination: GuessThePopulationView()) { + GameButton( + gradient: .quaternary, + level: "Level 4", symbol: "person.fill", name: "Guess the population" + ) + } } .padding() } - .navigationTitle("Select a game 🎮") + .navigationTitle("GeoQuiz") + .navigationBarTitleDisplayMode(.inline) .toolbar { ToolbarItem(placement: .navigationBarLeading) { Button {