【发布时间】:2019-04-05 22:44:08
【问题描述】:
在 Xcode 中,如果说我有一个 UICollectionViewCell,其中有一个 UIImageView,我习惯于制作一个自定义单元类来访问该 UIImage。然而,这有必要吗?我确信我不必为了访问UIImage 而创建自定义单元类。
我需要做一些类似...的事情吗?
for var subview in cell.subviews
{
if subview is UIImageView
{
subview = UIImageView()
subview.image = //change image here
}
}
谢谢!
【问题讨论】:
标签: ios swift image uicollectionview cell