I am working on the code below to check the textField1
and textField2
text fields whether there is any input in them or not.
The IF
statement is not doing anything when I press the button.
@IBOutlet var textField1 : UITextField = UITextField()
@IBOutlet var textField2 : UITextField = UITextField()
@IBAction func Button(sender : AnyObject)
{
if textField1 == "" || textField2 == ""
{
//then do something
}
}