So at the moment I have created a label with a frame on the screen which displays the chosen text. I also have two different arrays for the first and last name.
let nameArray = ["Jacob", "Lenny", "George", "Linda", "Arthur"] let lastNameArray = ["Shelby", "Knight", "Luiz", "Hamilton", "Dobson"]
when I use nameLabel.text = nameArray.randomElement() it works fine but I want it to display both, a random first name and a random last name from the given arrays within the same label. How would I go about doing this?
Aucun commentaire:
Enregistrer un commentaire