-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
I do not use storyboards at all and have created my collectionView and my cell programatically. I even registered my cell by using this:
func prepareCollectionView() {
dataSource = SnapLikeDataSource<DemoCell>(collectionView: collectionView, cellSize: cellSize)
dataSource?.delegate = self
collectionView.register(DemoCell.self, forCellWithReuseIdentifier: "cellID")
collectionView.showsHorizontalScrollIndicator = false
collectionView.decelerationRate = .fast
collectionView.backgroundColor = .clear
collectionView.delegate = dataSource
collectionView.dataSource = dataSource
dataSource?.items = ["A", "B", "C", "D", "E"]
view.addSubview(collectionView)
}However, it always crashes with an error could not dequeue a view of kind: UICollectionElementKindCell with identifier Any help on why this is happening?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels