lundi 4 avril 2016

How to assign two conditions to if statement

I'm still a beginner and I'm trying use || as an "or" option but it won't work.

  @IBAction func RunCode1(sender: AnyObject) {
        if TextField1.text == "true" || "false" {
           Outcome1.text = "false"
            CorrectText.hidden = false
            Reason.hidden = false
            Continue1.hidden = false
    }    

I want to do something when the textfield includes "true" or "false".

Aucun commentaire:

Enregistrer un commentaire