0
我试图注册UICollectionViewCells数组的数组,但在循环我得到这个错误:不能调用与类型的参数lsit“注册”“(UICollectionViewCell,forCellWithResueidentifier:字符串)”无法注册UICollectionViewCells
My playground
***let cell1 = UICollectionViewCell()
let cell2 = UICollectionViewCell()
let cells = [cell1, cell2]
let collection = UICollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout())
for cell in cells {
collection.register(cell, forCellWithReuseIdentifier: "hello")
}***
Any ideas?
Thanks in advance