mardi 12 juillet 2016

When my textfield is empty, my app crashes how do I respond to an empty text field?


I have a textfield in my app that interacts with a button. When i type nothing into the text field, my app crashes. To fix this, i've tried the following: if textField.text!.isEmpty { iLabel.text = "Please type something" } However, this does not work. Can someone please point out my flaws and how to fix this issue?

Aucun commentaire:

Enregistrer un commentaire