Quizzler app for iOS using Swift

Overview

App Brewery Banner

Quizzler

Our Goal

The goal of this tutorial is to take you one step further in your journey of becoming an app developer. We are going to introduce you to the holy grail of mobile design patterns: the Model View Controller (MVC) pattern. A design pattern is simply a repeatable and optimised solution to a common software problem and you’ll learn more about this when use in the tutorial.

What you will create

You will program a trivia quiz app. If you have another field of expertise such as law or medicine, you’ll be glad to know that multiple choice question apps are one of the most popular types of educational apps on the App Store!

What you will learn

  • How to programmatically change UI elements such as Labels and Buttons.
  • What is a design pattern and how is it used in programming.
  • How to use the Model-View-Controller or MVC pattern for app development.
  • Learn about Swift Structures how to instantiate a struct instance.
  • Understand the difference between value types and reference types.
  • Learn about Swift Classes and creating Objects.
  • Compare Swift Classes with Swift Structs and know when to use which.
  • Learn about Object Oriented Programming.
  • How to refactor code and stay organised.

Default Quiz

  Question(q: "A slug's blood is green.", a: "True"),
        Question(q: "Approximately one quarter of human bones are in the feet.", a: "True"),
        Question(q: "The total surface area of two human lungs is approximately 70 square metres.", a: "True"),
        Question(q: "In West Virginia, USA, if you accidentally hit an animal with your car, you are free to take it home to eat.", a: "True"),
        Question(q: "In London, UK, if you happen to die in the House of Parliament, you are technically entitled to a state funeral, because the building is considered too sacred a place.", a: "False"),
        Question(q: "It is illegal to pee in the Ocean in Portugal.", a: "True"),
        Question(q: "You can lead a cow down stairs but not up stairs.", a: "False"),
        Question(q: "Google was originally called 'Backrub'.", a: "True"),
        Question(q: "Buzz Aldrin's mother's maiden name was 'Moon'.", a: "True"),
        Question(q: "The loudest sound produced by any animal is 188 decibels. That animal is the African Elephant.", a: "False"),
        Question(q: "No piece of square dry paper can be folded in half more than 7 times.", a: "False"),
        Question(q: "Chocolate affects a dog's heart and nervous system; a few ounces are enough to kill a small dog.", a: "True")

Multiple Choice Quiz

 Question(q: "Which is the largest organ in the human body?", a: ["Heart", "Skin", "Large Intestine"], correctAnswer: "Skin"),
        Question(q: "Five dollars is worth how many nickels?", a: ["25", "50", "100"], correctAnswer: "100"),
        Question(q: "What do the letters in the GMT time zone stand for?", a: ["Global Meridian Time", "Greenwich Mean Time", "General Median Time"], correctAnswer: "Greenwich Mean Time"),
        Question(q: "What is the French word for 'hat'?", a: ["Chapeau", "Écharpe", "Bonnet"], correctAnswer: "Chapeau"),
        Question(q: "In past times, what would a gentleman keep in his fob pocket?", a: ["Notebook", "Handkerchief", "Watch"], correctAnswer: "Watch"),
        Question(q: "How would one say goodbye in Spanish?", a: ["Au Revoir", "Adiós", "Salir"], correctAnswer: "Adiós"),
        Question(q: "Which of these colours is NOT featured in the logo for Google?", a: ["Green", "Orange", "Blue"], correctAnswer: "Orange"),
        Question(q: "What alcoholic drink is made from molasses?", a: ["Rum", "Whisky", "Gin"], correctAnswer: "Rum"),
        Question(q: "What type of animal was Harambe?", a: ["Panda", "Gorilla", "Crocodile"], correctAnswer: "Gorilla"),
        Question(q: "Where is Tasmania located?", a: ["Indonesia", "Australia", "Scotland"], correctAnswer: "Australia")

This is a companion project to The App Brewery's Complete App Development Bootcamp, check out the full course at www.appbrewery.co

End Banner

You might also like...
SwiftUI Todo app example using a React/Redux monolithic state store with flux like dispatch/reduce actions
SwiftUI Todo app example using a React/Redux monolithic state store with flux like dispatch/reduce actions

SwiftUI-Todo-Redux SwiftUI Todo Redux app example using a React/Redux monolithic state store with flux like dispatch/reduce actions Background SwiftUI

Sandwhich is a mobile app built to solve the sandwich debate by determining if the picture you've taken is a sandwich using machine learning
Sandwhich is a mobile app built to solve the sandwich debate by determining if the picture you've taken is a sandwich using machine learning

Sandwhich Website | Twitter Sandwhich is a mobile app built to solve the sandwich debate by determining if the picture you've taken is a sandwich usin

Scrumdinger-ios - Built as a part of iOS app dev tutorials from app-dev-training
Scrumdinger-ios - Built as a part of iOS app dev tutorials from app-dev-training

Scrumdinger This repository contains the code written during my course of taking

Tipsy - Bill splitting and tip calculating App developed during iOS & Swift classes - The Complete App Development Bootcamp
Tipsy - Bill splitting and tip calculating App developed during iOS & Swift classes - The Complete App Development Bootcamp

Tipsy 💵 Bill splitting and tip calculating App developed during iOS & Swift cla

OMDburner is a free and Open Source Application developed using Swift.
OMDburner is a free and Open Source Application developed using Swift.

OMDburner is a free and Open Source Application developed using Swift.

Instagram Clone Application Built Using Swift And Firebase
Instagram Clone Application Built Using Swift And Firebase

InstagramClone Bu instagram klon uygulamasında CoreLocation, Snapkit, Firebase, KingFisher, IQKeyboardManagerSwift kütüphaneleri kullanılmıştır. Kulla

Some projects written in Swift 5 code designed using the MVVM design pattern.
Some projects written in Swift 5 code designed using the MVVM design pattern.

MVVM Design Pattern Demo This repository has contained some simple demo projects written in Swift code designed using the MVVM design pattern. Project

Owner
null
Sample app to demonstrate the integration code and working of Dyte SDK for iOS, using Swift

docs-template by dyte ADD_DESCRIPTION_HERE Explore the docs » View Demo · Report Bug · Request Feature Table of Contents About the Project Built With

Dyte 8 Nov 26, 2021
iOS App that browse the people from Star Wars Universe using GraphQL Api.

Ravn-Challenge-V2--OscarCastillo- iOS App that browse the people from Star Wars Universe using GraphQL Api. This project uses Apollo swift Client. htt

Oscar Castillo 4 Jun 9, 2021
iOS app for keeping track of tasks using to-do lists

ToDo ToDo is a simple app that helps you keep track of tasks. Requirements iOS 15+ iPadOS 15+ License Distributed under the GPLv3 license. See LICENSE

Daniil 3 Apr 23, 2022
Demo project using React Native technology to create a simple iOS app to find music in iTunes

React Native, native iOS apps with JavaScript iTunesCatalog is a demo app that aims to show the React Native platform potential. There are included th

Alexis Santos Pérez 55 Feb 10, 2022
A basic todo app using swift

Toodoo A basic todo app Features Basics Today List Categorize Prioritize Future Tasks Support Pictures Reorder Tasks Cross platform Quick Entry Analyz

null 0 Nov 1, 2021
Sample app to demonstrate using Firebase features

Photoram Sample app to demonstrate using Firebase features Uses: Firebase authentification for login and registrations Firebase storage to keep image

Anna Zharkova 3 Jun 4, 2021
An example app with using ShazamKit

ShazamKitExample An example app with using ShazamKit. Check out a live demo on Twitter. Related Resources Introducing ShazamKit WWDC21 — Explore Shaza

Artem Novichkov 10 May 25, 2022
The demo app demonstrates a real-time application using FindSurface to search point clouds, which ARKit provides, for geometry shapes.

FindSurface-GUIDemo-iOS (Swift) CurvSurf FindSurface™ GUIDemo for iOS (Swift) Overview This demo app demonstrates a real-time application using FindSu

CurvSurf 0 Nov 28, 2022
A social feed app built using Texture framework

A social feed screen created using Texture framework for UI purposes only.

Ammad Akhtar 3 Nov 17, 2021
A sample app that will display some airport information using MVVM pattern

Simulator.Screen.Recording.-.iPhone.11.-.2021-11-15.at.14.27.41.mp4 AirportDisplayApp A sample app that will display some airport information using MV

Sabrina Hoque Tuli 0 Nov 15, 2021