samedi 30 juillet 2016

Find object by tag (in swift)

I have a variable @IBOutlet var ImageViews: [UIImageView]! that holds my 36 UIImages from the storyboard. I have set a tag to one random Image;

ImageViews[5].tag = 5

I want to be able to find this Image through the tag only and change its background color.

(Image in ImageViews with tag 5)

HERE'S THE CODE IN C# maybe you can translate it? I can't.

Aucun commentaire:

Enregistrer un commentaire