Error could not dequeue a view of kind UICollectionElementKindCell

前端 未结 13 1392
耶瑟儿~
耶瑟儿~ 2020-12-16 09:34

Taking first plunge with collection views and am running into this error:

Terminating app due to uncaught exception \'NSInternalInconsistencyException

13条回答
  •  甜味超标
    2020-12-16 10:05

    Just in case, if you are working with storyboard set collectionView identifier in the right place in the Attributes Inspector -> Identifier field. Not under the class name in "Restoration ID".

    If you are using collection view in tableView cell, add delegates to tableView cell not in the tableViewController.

提交回复
热议问题