gpt4 book ai didi

ios - UITableView 没有出现在模拟器中

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

我用静态cells构建了UItableView,当我尝试运行它时,我的模拟器中什么也没有出现,

这是我的界面生成器的样子:

enter image description here在模拟器中:

enter image description here

最佳答案

您需要为部分数和行数提供返回值。默认为 0

override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
// Return the number of sections.
return 1
}

override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {

// Return the number of rows in the section.

return 3
}

关于ios - UITableView 没有出现在模拟器中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29909905/

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