trivial-trivia icon indicating copy to clipboard operation
trivial-trivia copied to clipboard

iOS trivia game built with SwiftUI 📲

Trivial Trivia

iOS trivia game built with SwiftUI 📲

Github

logo

Table of Contents

    📝 About
    💻 How to Build
    🔧 Tools Used
References 👤 Contact

📝About

  • Built a Trivia game application "Trivial Trivia" from scratch using SwiftUI.
  • iOS native; does not work on: Android, web.
  • Feel free to try yourself for fun, or modify to make your own versions.

💻How to Build

  • Complete code implementation from API through front-facing modern UX/UI.
  • Questions and answers pulled from OpenTrivia database.
  • Separated into 10 random QuestionView and AnswerView components.
  • Modify data from OpenTrivia API pull by converting to markdown and utilizing AttributedString.
  • Calculates final score and allows user to regenerate new set of q/a.


🔧Tools Used

swiftui opentrivia


References

  • OpenTrivia API helper: https://opentdb.com/api_config.php
  • OpenTrivia API endpoint: https://opentdb.com/api.php?amount=10.
  • AttributedString: https://designcode.io/swiftui-handbook-markdown-attributed-string

👤Contact

Email Twitter