mercredi 27 juillet 2016

Remove object from UIImageView

I want to remove an object from a UIImageView. In the collection I've got 36 UIImageViews that I use to randomly rotate and change the images. But after this code;

self.ImageViews[5].image = UIImage(named: "squirrel")

I want to remove the object (ImageViews[5]) so that it no longer will be changed ---- thereby I think deleting it temporary from the UICollectionView is the best solution.

Something like this?

ImageViews = ImageViews.filter() { $0 != ImageViews[5] }

Aucun commentaire:

Enregistrer un commentaire