# HG changeset patch # User Dennis C. M. # Date 1666855033 -7200 # Node ID 02dcebb8cc4a1a31fff39494dc2fe5927bfbf381 # Parent 56add556126128e46d197603fae4f146571ee8b4 fix layout issues diff -r 56add5561261 -r 02dcebb8cc4a GeoQuiz/Assets.xcassets/Custom colors/AtomicTangerine.colorset/Contents.json --- a/GeoQuiz/Assets.xcassets/Custom colors/AtomicTangerine.colorset/Contents.json Wed Oct 26 08:20:19 2022 +0200 +++ b/GeoQuiz/Assets.xcassets/Custom colors/AtomicTangerine.colorset/Contents.json Thu Oct 27 09:17:13 2022 +0200 @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "84", - "green" : "142", - "red" : "247" + "blue" : "0x54", + "green" : "0x8E", + "red" : "0xF7" } }, "idiom" : "universal" diff -r 56add5561261 -r 02dcebb8cc4a GeoQuiz/Assets.xcassets/Custom colors/PinkLavender.colorset/Contents.json --- a/GeoQuiz/Assets.xcassets/Custom colors/PinkLavender.colorset/Contents.json Wed Oct 26 08:20:19 2022 +0200 +++ b/GeoQuiz/Assets.xcassets/Custom colors/PinkLavender.colorset/Contents.json Thu Oct 27 09:17:13 2022 +0200 @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "231", - "green" : "195", - "red" : "238" + "blue" : "0xE7", + "green" : "0xC3", + "red" : "0xEE" } }, "idiom" : "universal" diff -r 56add5561261 -r 02dcebb8cc4a GeoQuiz/GuessTheCapitalView.swift --- a/GeoQuiz/GuessTheCapitalView.swift Wed Oct 26 08:20:19 2022 +0200 +++ b/GeoQuiz/GuessTheCapitalView.swift Thu Oct 27 09:17:13 2022 +0200 @@ -20,6 +20,7 @@ GeometryReader { geo in VStack { GameToolbar(game: game, color: .atomicTangerine) + .padding(.bottom) Spacer() @@ -79,6 +80,10 @@ GuessTheCapitalView() .previewDevice(PreviewDevice(rawValue: "iPad Pro (12.9-inch) (5th generation)")) - .previewDisplayName("iPad Pro (12.9-inch) (5th generation)") + .previewDisplayName("iPad Pro (12.9-inch)") + + GuessTheCapitalView() + .previewDevice(PreviewDevice(rawValue: "iPhone 8")) + .previewDisplayName("iPhone 8") } } diff -r 56add5561261 -r 02dcebb8cc4a GeoQuiz/GuessTheCountryView.swift --- a/GeoQuiz/GuessTheCountryView.swift Wed Oct 26 08:20:19 2022 +0200 +++ b/GeoQuiz/GuessTheCountryView.swift Thu Oct 27 09:17:13 2022 +0200 @@ -20,11 +20,13 @@ GeometryReader { geo in VStack { GameToolbar(game: game, color: .pinkLavender) + .padding(.bottom) Spacer() CityMap(game: game) .frame(height: geo.size.height * 0.35) + .padding(.bottom) Spacer() @@ -74,6 +76,10 @@ GuessTheCountryView() .previewDevice(PreviewDevice(rawValue: "iPad Pro (12.9-inch) (5th generation)")) - .previewDisplayName("iPad Pro (12.9-inch) (5th generation)") + .previewDisplayName("iPad Pro (12.9-inch)") + + GuessTheCountryView() + .previewDevice(PreviewDevice(rawValue: "iPhone 8")) + .previewDisplayName("iPhone 8") } } diff -r 56add5561261 -r 02dcebb8cc4a GeoQuiz/GuessTheFlagView.swift --- a/GeoQuiz/GuessTheFlagView.swift Wed Oct 26 08:20:19 2022 +0200 +++ b/GeoQuiz/GuessTheFlagView.swift Thu Oct 27 09:17:13 2022 +0200 @@ -79,6 +79,10 @@ GuessTheFlagView() .previewDevice(PreviewDevice(rawValue: "iPad Pro (12.9-inch) (5th generation)")) - .previewDisplayName("iPad Pro (12.9-inch) (5th generation)") + .previewDisplayName("iPad Pro (12.9-inch)") + + GuessTheFlagView() + .previewDevice(PreviewDevice(rawValue: "iPhone 8")) + .previewDisplayName("iPhone 8") } } diff -r 56add5561261 -r 02dcebb8cc4a GeoQuiz/GuessThePopulationView.swift --- a/GeoQuiz/GuessThePopulationView.swift Wed Oct 26 08:20:19 2022 +0200 +++ b/GeoQuiz/GuessThePopulationView.swift Thu Oct 27 09:17:13 2022 +0200 @@ -20,6 +20,7 @@ GeometryReader { geo in VStack { GameToolbar(game: game, color: .maizeCrayola) + .padding(.bottom) Spacer() @@ -80,6 +81,10 @@ GuessThePopulationView() .previewDevice(PreviewDevice(rawValue: "iPad Pro (12.9-inch) (5th generation)")) - .previewDisplayName("iPad Pro (12.9-inch) (5th generation)") + .previewDisplayName("iPad Pro (12.9-inch)") + + GuessThePopulationView() + .previewDevice(PreviewDevice(rawValue: "iPhone 8")) + .previewDisplayName("iPhone 8") } } diff -r 56add5561261 -r 02dcebb8cc4a GeoQuiz/Logic/PersistenceController.swift --- a/GeoQuiz/Logic/PersistenceController.swift Wed Oct 26 08:20:19 2022 +0200 +++ b/GeoQuiz/Logic/PersistenceController.swift Thu Oct 27 09:17:13 2022 +0200 @@ -18,7 +18,7 @@ let viewContext = result.container.viewContext #if DEBUG - createMockData(nil, viewContext) + createMockData(with: viewContext) #endif return result @@ -41,7 +41,7 @@ } #if DEBUG - static func createMockData(_ playedGames: FetchedResults?, _ moc: NSManagedObjectContext) { + static func createMockData(with moc: NSManagedObjectContext) { for _ in 0..<10 { let playedGame = PlayedGame(context: moc) diff -r 56add5561261 -r 02dcebb8cc4a GeoQuiz/ProfileModalView.swift --- a/GeoQuiz/ProfileModalView.swift Wed Oct 26 08:20:19 2022 +0200 +++ b/GeoQuiz/ProfileModalView.swift Thu Oct 27 09:17:13 2022 +0200 @@ -80,7 +80,9 @@ #if DEBUG .onAppear { - PersistenceController.createMockData(playedGames, moc) + if playedGames.isEmpty { + PersistenceController.createMockData(with: moc) + } } #endif }