dimanche 25 septembre 2016

Swift 3: Add text to label if button is pressed

In my Xcode project, I have five empty text labels (i.e. I, II, III, IV, V) and five buttons, each representing one letter (i.e. a, b, c, d, e).

I'd like to fill the text labels I to V with the letters, but in the order the letter buttons are pressed (i.e. user presses c → label I contains letter c; then user presses a → label II contains letter a and so on).

Could you give me any hint / solution how to do this?

Thanks, J.

Aucun commentaire:

Enregistrer un commentaire