私はストーリーボードにcollectionview
をロードしています。しかし、私はそれを実行すると、それは表示されませんでした。それで、デリゲートとデータソースが設定されていないことがわかった。しかし、私は、デリゲート&データソースを設定して、再度実行すると、プログラムがクラッシュが'could not dequeue a view of kind: UICollectionElementKindCell with identifier prdImgscellIdentifier - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
コレクションビューを読み込めません
を言って
これは..私はクラッシュが起こっている理由を把握することができ欠場anything..butないなかったようですprdImgscellIdentifier
としてストーリーボードでCollectionViewCellの私cellForItemAt...
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! productImagesCollectionViewCell
cell.myImageView.image = UIImage(named: "appLogo.jpg")
return cell
}
カスタムセルまたはカスタムヘッダーを使用していますか? – Jack
私はカスタムセルを使用していると思います...カスタムヘッダは何ですか? – bws
[Swift - 種類のビューをデキューできませんでした:UICollectionElementKindCell with ID](https://stackoverflow.com/questions/31581903/swift-could-not-dequeue-view-of-kind-uicollectionelementkindcell- with-ident) –