A case study based on RayWendelich's iOS Design Patterns tutorial. The app consists of common design patterns found in many iOS apps, allowing the user to create a set of questions, test their Japanese knowledge, choose between random or sequential order, save and display the user's tracked score.
To learn common design patterns found in many iOS apps. Patterns such as
- Model-View-Controller
- Delegation
- Strategy
- Singleton
- Memento
- Observer
- Builder
You can launch this project in Xcode and simulate the app on your preffered iOS simulator. You can also try to install it on your physical iOS device.
This app is perfect for practicing japanese! You will be greeted with a set of questions, you can choose which ever set you want to start with. The goal is to guess the answer, check if it's correct and press on the red button if it's wrong or green if it's correct. Make sure to stay honest to yourself. You can set the questions in random or sequential order and even create your very own set of questions! A perfect Japanese quiz app to test your skills and track your own knowledge!
Guess | Check | Track | Create |
---|---|---|---|
Attempt a challange | Check if its correct by tapping on the screen | Keep track of your score | Create your own set! |
![]() |
![]() |
![]() |
![]() |
The app delegate files can be found in the App delegate folder. This folder consits of app delegate files given by Xcode's biolerplate code in UIKit.
The builder files can be found in the Builder folder
File | Description | Obejcts |
---|---|---|
QuestionGroupBuilder.swift | This file contains objects that help with the creation and deletion of custom questions | QuestionGroupBuilder, QuestionBuilder |
The Caretakers files can be found in the Caretaker folder
File | Description | Obejcts |
---|---|---|
DiskCaretaker.swift | This file contains objects that help write and save data onto a file | DiskCaretaker |
QuestionGroupCaretaker.swift | Consists of an object that saves and loads a group of questions | QuestionGroupCaretaker |
The controllers files can be found in the Controllers folder
File | Description |
---|---|
AppSettingsViewController.swift | Provides information about optional settings |
CreateQuestionGroupViewController.swift | Helps create Question groups and setsup table view |
QuestionViewController.swift | Displays and interacts with the user's quiz questions |
SelectQuestionGroupViewController.swift | Helps display the set of questions available and provides the settings |
File | Obejcts | Protocol |
---|---|---|
AppSettingsViewController.swift | AppSettingsViewController | None |
CreateQuestionGroupViewController.swift | CreateQuestionGroupViewController | CreateQuestionGroupViewControllerDelegate |
QuestionViewController.swift | QuestionViewController | QuestionViewControllerDelegate |
SelectQuestionGroupViewController.swift | SelectQuestionGroupViewController | None |
The model files can be found in the Models folder
File | Description | Obejcts |
---|---|---|
AppSettings.swift | Informs the UserDefaults about the user's settings | AppSettings, QuestionStrategyType |
Question.swift | Contains the model for a question | Question |
QuestionGroup.swift | Contains information about the set of questions | QuestionGroup |
The Resource files can be found in the Resources folder
It Contains resouces such as user info, JSON dictionary of questions and app images
The Strategies files can be found in the Strategies folder
File | Description | Obejcts |
---|---|---|
BaseQuestionStrategy.swift | contains methods that informs and aids in the transition of questions | BaseQuestionStrategy |
QuestionStrategy.swift | An interface for the methods that aid in the transition of questions | QuestionStrategy |
RandomQuestionStrategy.swift | contains the procedure of shuffling and randomzing a given set of questions | RandomQuestionStrategy |
SequentialQuestionStrategy.swift | contains the procedure of sequential set of questions | SequentialQuestionStrategy |
The Views files can be found in the Views folder
File | Description | Obejcts |
---|---|---|
CreateQuestionCell.swift | Contains outlet connections for the creation View. | CreateQuestionCell |
CreateQuestionGroupTitleCell | Creates a title based on the question name | CreateQuestionGroupTitleCell |
JapaneseTextField.swift | Converts textfields into Japanese | JapaneseTextField, CaseBasedChart, KatakanaChart, HiraganaChart |
QuestionGroupCell.swift | Contains the cell that displays the title and percentage | QuestionGroupCell |
QuestionView.swift | Contains outlet connections to the prompt view | QuestionView |
LaunchScreen.storyboard | The launch screen | None |
MainStoryboard.storyboard | The main story board containing the prototype view | None |
NewQuestionGroup.storyboard | The new custom question prototype view | None |