Hi! I am creating a quiz. I need a variable for the number of questions the user chooses. I have linked the buttons that allow this to a ViewController. How can I make sure that I can use that variable in another ViewController (where the code is written for the questions)?
vermont42
(Josh Adams)
2
If you’re storing questions in an array, the number of questions could be implied by the size of the array. Here is an example of that: Conjugar/Quiz.swift at master · vermont42/Conjugar · GitHub
An instance of Quiz may be shared among view controllers.