【发布时间】:2015-05-27 05:26:37
【问题描述】:
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell:UITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as UITableViewCell
cell.textLabel!.text = self.funlists[indexPath.row]
return cell
}
无法使用“(字符串)”类型的参数调用“dequeReusable...” 在线 var cell:UITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as UITableViewCell
(对不起,我对 Xcode 和 swift 非常陌生) 当我在我的故事板中单击我的 UITableView 时,它是一个表格视图单元格,带有样式子标题和标识符单元格。 (我可能完全错了,不确定)
【问题讨论】:
-
var cell:UITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("cell",forIndexPath: indexPath) as UITableViewCell
-
在故事板中定义单元格标识符
-
@Memon,谢谢我在情节提要中定义了单元格标识符。当我将代码行更改为您提供的内容时,我收到错误消息:无法在行上使用类型为“(String,forIndexPath:NSindexPath)”的参数调用“dequeReusable ...”
标签: ios uitableview swift parse-platform