gpt4 book ai didi

ios - 在 uitableview 单元格中快速显示你好

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

func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
var cell = tableView.dequeueReusableCellWithIdentifier("Cell") as UITableViewCell!
cell.textLabel?.text = "hello"
return cell
}

出现 fatal error

fatal error: unexpectedly found nil while unwrapping an Optional value

最佳答案

func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell:UITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as UITableViewCell

cell.textLabel?.text = "hello"

return cell
}

关于ios - 在 uitableview 单元格中快速显示你好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27740907/

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