the error refers to the fact that you’re accessing the parameter of an optional value when the optional value is set to nil (e.g. accessing answerField.text
when answerField
is nil), likely one of your two UILabels
.
If the line operaterLabel.text == ""
is throwing the exception, then your operaterLabel
is nil. Verify that you have connected it successfully to the label in your Interface Builder file.