December 2018
Intermediate to advanced
414 pages
10h 19m
English
The model layer of our application will contain the following:
// Question.swiftenum BooleanAnswer: String { case `true` case `false`}struct Question { let question: String let answer: BooleanAnswer}extension Question { func isGoodAnswer(result: String?) -> Bool { return result == answer.rawValue }}// QuestionController.swiftclass QuestionController { private var questions = [Question]() // Load the questions from memory or disk func load() { /* load from disk, memory or else */ } // Get the next question, ...
Read now
Unlock full access