Dear community,
I came across a roadblock in one of my exercises from the book "Develop in Swift Fundamentals".
The goal is to create an iOS app about a Quiz, which includes questions, answers and in the end it brings a final screen with results.
The book asks to create different View Controllers, one for the questions and answers, and another one for the results. They are named as following:
QuestionsViewController: For questions and answers
ResultsViewController: For the final result
There is a Segue from the "Questions" to the "Results" view controllers.
Each view controller has its own Swift file with some coding. The error message I'm getting is in the "ResultsViewController" only, after I added the following line of code:
var responses: [Answer]
(ERROR: Cannot find type 'Answer' in scope):
As you can see, it's complaining that the type "Answer" cannot be found in the scope of the "ResultsViewController", however it can be found in the "QuestionViewController", as the screenshot below:
Does anyone know why I'm getting this error message? I appreciate any input. I have tried to get an answer from ChatGPT but with no success.
Thank you, Rodrigo
Hi @Claude31 ,
Thank you very much for your help. It worked!
I'm blessed by the power of this community. Hopefully I will be able to help others someday too.
Thanks again, Rodrigo