mardi 4 septembre 2018

How do you hide labels and randomly show one out of multiple? Swift

Trying to hide three labels with the click of a button and at random show one out of the three. Here is my code so far- `

    @IBAction func decideBttn(_ sender: Any) {
    var topics = [valueLbl1, valueLbl2, valueLbl3]

    if valueLbl1.text?.isEmpty == false && valueLbl2.text?.isEmpty == false && valueLbl3.text?.isEmpty == false{


 }




Aucun commentaire:

Enregistrer un commentaire