samedi 28 juillet 2018

if statement for random string and int

I have this if statement working well but the code DqJUXRcx may change. How to make it == random code?

@IBAction func btnPlusPressed(_ sender: UIButton) {
    var strURLl = url.text!

    if (url.text == "DqJUXRcx" as String ){
        strURLl = "https://pastebin.com/raw/\(url.text!)"
    } else {
        strURLl = "\(url.text!)"
    }
}




Aucun commentaire:

Enregistrer un commentaire