Title: Trivia Time Purpose: To help people test their knowledge with a 10-question quiz.
BUILT USING:
SwiftUI
URLSession (for networking)
JSONDecoder and Codable structs
Open Trivia DB API
Xcode
FEATURES
Choose your difficulty before starting (easy, medium, hard)
Loads 10 random trivia questions from the Open Trivia DB API
Shows multiple choice answers and highlights the correct one
Tracks your score and shows it at the end
Final screen with your results + option to play again
Navy and blue color theme for a clean look
CHALLENGES
Figuring out how to decode the JSON properly (I had to fix an error where it was expecting an ID that didn’t exist)
Getting the answer buttons to be reusable and update the score
Making sure everything looked readable on a dark background
Debugging when my app kept loading trivia over and over
FUTURE ADDITIONS
Being able to access different trivia games. Changing the UI so that users can choose what game they want to play and pick the category. Create levels/incentives.