unable to dequeue a cell with identifier Cell

不打扰是莪最后的温柔 提交于 2019-12-26 18:43:22

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

ios开发,cell输出数据的时候出现问题

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard' 


解决方法:

声明 表格 的时候,加上下面这行代码就行了

        表格?.registerClass(UITableViewCell.self, forCellReuseIdentifier: "你的cell identifier")

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!