UICollectionViewで遭遇したエラー:'could not dequeue a view of kind: UICollectionElementKindCell with identifier CollectionViewCell

初めてUICollectionViewを作ってはまったのでめもめも。

 *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:], /SourceCache/UIKit/UIKit-2903.23/UICollectionView.m:3117
 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier CollectionViewCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'

⇒UICollectionView作成時のCellのクラス追加しわすれ。作成時に追加

[self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"UICollectionViewCell"];