- Solution URL: Git Repo
This is a solution to the Guess the flag challenge on 100 days of SwiftUI.
Guess The Flag is a native iPhone guessing game that helps users learn some of the many flags of the world. It is built entirely in SwiftUI.
· Using stacks to arrange views · Colors and frames · Gradients · Buttons and images · Showing alert messages · Stacking up buttons · Showing the player's score with an alert · Styling the flags · Tracking the users score · Ending the game · Removing repeats
Users should be able to:
- Select from a group of 3 different country flags
- Get alerted and increase their score if they answer correctly
- Get alerted and decrease their score if they answer incorrectly
- Never be allowed to score below zero
- Only be allowed to play 10 rounds
- Be able to restart the game
- Experience an aesthetically pleasing and intuitive UI
Native Languages & Utilities |
This was my second project in SwiftUI, and it tested basic SwiftUI functionality: stacks, buttons, images, alerts, asset catalogs, and more. This exercise also illustrated the efficiency of SwiftUI: the entire application (including the styling) is 94 lines of code!
- Website - John Ross Phillips
- 100 Days of SwiftUI - @twostraws