iOS Trivia app that uses OpenTriviaDatabase API
- Implemented in SwiftUI
- MVVM Architecture
- API Fetching and JSON decoding
- Light and Dark Mode UI
- Relative Component Sizing / Positioning
- Responsive User Interface for iPhones
Project Structure
./iOSTrivia
βββ Assets.xcassets
βΒ Β βββ AccentColor.colorset
βΒ Β βΒ Β βββ Contents.json
βΒ Β βββ AppIcon.appiconset
βΒ Β βΒ Β βββ Contents.json
βΒ Β βββ BackgroundColor.colorset
βΒ Β βΒ Β βββ Contents.json
βΒ Β βββ Contents.json
βΒ Β βββ ContrastColor.colorset
βΒ Β βββ Contents.json
βββ Components
βΒ Β βββ OptionButton.swift
βΒ Β βββ ProgressBar.swift
βββ Extensions
βΒ Β βββ Extensions.swift
βββ Models
βΒ Β βββ Answer.swift
βΒ Β βββ Category.swift
βΒ Β βββ Question.swift
βββ Preview Content
βΒ Β βββ Preview Assets.xcassets
βΒ Β βββ Contents.json
βββ Services
βΒ Β βββ TriviaService.swift
βββ ViewModels
βΒ Β βββ ContentViewModel.swift
βΒ Β βββ QuestionsViewModel.swift
βΒ Β βββ TriviaOptionsViewModel.swift
βββ Views
βΒ Β βββ ContentView.swift
βΒ Β βββ QuestionsView.swift
βΒ Β βββ TriviaOptionsView.swift
βββ iOSTriviaApp.swift
Screen.Recording.2022-08-27.at.6.42.16.PM.mov
Trivia questions and category obtained from https://opentdb.com