I am using swiftlint as a way to code better, and for the most part I have been able to muddle my way through up to the following code which includes a forced downcast:
let questionToAdd = MultipleChoiceQuestion(question: dictionary["Question"] as! String,
correctAnswer: dictionary["CorrectAnswer"] as! String,
answers: dictionary["Answers"] as! [String])
questions.append(questionToAdd)
I have been unable to remove the forced unwrapping. Any suggestions would be greatly appreciated. I have tried used the ELSE { return } but that isn't working either, could be the way I had it structured..nonetheless any help or point me in the right direction would be appreciated.