Error could not dequeue a view of kind UICollectionElementKindCell

前端 未结 13 1388
耶瑟儿~
耶瑟儿~ 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 09:56

    i had everything 100% done correctly. but for some reason i got the same error for an hour, then what i did is:

    1. go to storyboard
    2. select the prototype cell (in my case)
    3. clear the class name from identity inspector, then rewrite it
    4. rewrite the identifier name in the attributes inspector

    simply, redid this step even tho i made it correct before, its like xcode misses something at a specific nanosecond!

提交回复
热议问题