gpt4 book ai didi

swift - 源文件中的编辑器占位符 tableview.dequeueReusableCell

转载 作者:行者123 更新时间:2023-11-28 15:40:56 26 4
gpt4 key购买 nike

不断收到此错误:

'Editor placeholder in source file'

tableView.dequeueReusableCell 行上,不知道哪里出了问题。请帮助如何摆脱这个错误。函数原型(prototype)由 Xcode 建议。无法删除 tableView.dequeueReusableCell 中的 withIdentifier,因为有人建议解决此问题。

func tableView(_ tableView:UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "BasicCell", for: IndexPath)
cell.textLabel?.text = filters[indexPath.row]

return cell
}

enter image description here

最佳答案

看看哪里出错了。它位于 for: 之后的 IndexPath 部分。

您必须将该占位符替换为有效的 IndexPath 引用,例如 indexPath 参数。

关于swift - 源文件中的编辑器占位符 tableview.dequeueReusableCell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43686427/

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