lundi 4 janvier 2021

Fatal Error: Unexpectedly found nil while unwrapping an Optional value if statement

I keep getting a Unexpectedly found nil while unwrapping an Optional value, when it comes to the second &&

if Double(dependents.text!) ?? 1 >= 1 && Double(dependents.text!) ?? 1 <= 10 && Double(textField.text!)! >= 0.00 && Double(textField.text!)! <= 165.00 && marriageStatus.selectedSegmentIndex == 0{ fedTax.text = String(0.00) }

That is my code, the bold "&&" is where I get the error. If someone can help me, that would be great!

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire