【发布时间】:2018-03-30 05:05:13
【问题描述】:
然而,当我实现第一个 tableView 并且它工作正常时,我尝试在 Tabbar 上的同一个 viewController 上实现另一个 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'
【问题讨论】:
-
你能告诉你的代码你试过@iOS吗
-
@DilipTiwari,我什么都没做,我只是将第二个 tableView 添加到标签栏下的 ViewController 并运行应用程序。
-
当我在标签栏下使用单个 tableView 时它正在工作
-
stackoverflow.com/questions/23526756/… 或者请分享演示代码
-
显示您的故事板的屏幕截图,其中选择了两个表,并且属性检查器必须在其中可见。我认为您缺少单元格标识符。另一件事是使用单元格并错过了向表格视图注册单元格类。