使用未声明的标识符" customTableViewCell"

时间:2016-09-26 09:16:25

标签: swift xcode identifier undeclared-identifier

我正在尝试实现此讨论中提出的代码; [Retrieve only 5 users at a time :Firebase [like Instagram]

不幸的是,我收到以下错误,我无法解决:

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = customTableView.dequeueReusableCell(withIdentifier: "customCell1","customCell2","customCell3","customCell4","customCell5") as! customTableViewCell
    if dataFeed.count > 0{
        cell.poatLabel.text = dataFeed[indexPath.row].postData
    }
    return cell
}

它表示"使用未声明的标识符&customTableViewCell'" .. 我该如何解决这个问题? 我是否在某处声明了Cell?

帮助表示感谢。谢谢, 利奥

2 个答案:

答案 0 :(得分:0)

转到故事板。选择表格视图单元格。检查标识符。

答案 1 :(得分:0)

正如你所说,创建新课程对我有用。 “TableViewCell”类。到目前为止它的确有效。

我没有一个名为TableViewController的类。 未来可能会遇到错误......

谢谢

相关问题