iOS - UITableView 不显示单元格

标签 ios uitableview reuseidentifier

我在 Storyboard中设置了以下界面:

enter image description here

Controller 是从 UITableViewController 扩展而来的自定义 Controller 。当我运行我的应用程序时,这是我得到的:

enter image description here

我认为它可能与重用标识符有关,所以我将它们更改为每个单元格唯一的东西,并相应地修改了代码,但仍然没有任何显示。

最佳答案

如果您在 Storyboard 中使用静态单元格,则必须从您的代码中删除所有 TableView 数据源方法(节中的行数、节中的行、索引路径中行的单元格...) TableView Controller ,否则静态单元格将被覆盖。

关于iOS - UITableView 不显示单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9610155/

相关文章:

ios - dequeueReusableCellWithIdentifier :forIndexPath: VS dequeueReusableCellWithIdentifier:

iphone - UITableView出队ReusableCellWithIdentifier理论

ios - Objective C - UI 列表高度

ios - 谁拥有 cocoapods 的推送权?

ios - 午睡作为 linux 上 SwiftPM 的依赖

ios - UITableView Pagination willDisplay 一次又一次地快速调用

ios - 如何在 iOS 中以编程方式预选多选 UITableView 中的单元格

ios - 单元格的进度条在其他单元格上重复

ios - MKMapView 在 iOS 5.0 下无法滚动和缩放

ios - UITableViewController 和 TableView 高度