IOS开发 TableView unable to dequeue a cell with identifier Cell - must register a

最近转做IOS开发,目前还在研究界面阶段,刚刚在用TableView做列表的时候碰到以下错误:

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'

 

网上找到的其他文档都没能解决我的这个问题,后来想到我的这个TableView不是从控件里面拖过来的TableView,而是从UIView改类型过来的,于是我把这个View删掉,然后从控件列表里拖了一个标准的TableView Controller过来,然后就可以了。

仅作记录,如果其他的朋友遇到同样的问题可以检查下自己的TableView  Controller是不是标准的Table控件。

猜你喜欢

转载自chenhbc.iteye.com/blog/2037778