【发布时间】:2016-06-17 11:14:22
【问题描述】:
我想从UIImageView 中删除一个对象。在集合中,我有 36 个 UIImageViews 用于随机旋转和更改图像。但是在这段代码之后;
self.ImageViews[5].image = UIImage(named: "squirrel")
我想删除对象 (ImageViews[5]) 以便它不再被更改 ---- 因此我认为从 UICollectionView 中临时删除它是最好的解决方案。
这样的?
ImageViews = ImageViews.filter() { $0 != ImageViews[5] }
【问题讨论】:
标签: ios swift uiimageview uiimage uicollectionview