gpt4 book ai didi

ios - 模拟器上的 Tableview 为空

转载 作者:行者123 更新时间:2023-11-29 02:45:23 25 4
gpt4 key购买 nike

我正在尝试创建一个 TableView 来复制登录功能。我设计了表格 View 并在其他选项卡 View 中放置了一些默认值。

当我在模拟器上运行时,我的 TableView 显示为空 - 但我真的不知道或不明白为什么。

enter image description here

enter image description here

最佳答案

您必须在 Interface Builder 中删除数据源。只需选择其中的 tableView 并转到 Connections Inspector(右侧最后一个图标)。顶部是DataSource,点击叉号即可将其删除。

Some Image to demonstrate the process

单元格必须是静态的(选择 tableView):

Attributes Inspector with tableView selected

“不同之处在于静态你不需要编码,因为它是一样的,那是你应该选择的,因为它是一个登录页面,不需要原型(prototype)”- meda

关于ios - 模拟器上的 Tableview 为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25210107/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com