我已经使用过UICollectionViewController并且正在尝试将图像添加到我的集合视图单元格中,但UICollectionView方法没有被调用。
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath as IndexPath) as! CircularCollectionViewCell
cell.imageName = images[indexPath.row]
return cell
}
Run Code Online (Sandbox Code Playgroud)