Uitableview 无法将标识符为的单元格出列(可访问性标识符为的错误)

Uitableview 无法将标识符为的单元格出列(可访问性标识符为的错误),uitableview,swift,identifier,Uitableview,Swift,Identifier,我一直在 无法将标识符为TransactionCell的单元格出列-必须为标识符注册nib或类,或连接情节提要中的原型单元格 但我不明白为什么。我在情节提要中设置了一个标识符(无法上传截图-声誉不够) 这是我的实际代码 override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = self

我一直在

无法将标识符为TransactionCell的单元格出列-必须为标识符注册nib或类,或连接情节提要中的原型单元格

但我不明白为什么。我在情节提要中设置了一个标识符(无法上传截图-声誉不够)

这是我的实际代码

  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

    let cell = self.tableView.dequeueReusableCellWithIdentifier("TransactionCell", forIndexPath: indexPath) as TransactionCell


    var transaction: Transaction

    transaction = Manager.sharedManager.transactions[indexPath.row]

    var dateFormatter = NSDateFormatter()
    dateFormatter.dateFormat = "yyyy-MM-dd"

    var myAmount = String(transaction.amount)
    cell.amountLabel?.text = myAmount
    cell.dateLabel?.text = dateFormatter.stringFromDate(transaction.date)
    cell.descriptionLabel?.text = transaction.description

    return cell
}
我在情节提要中设置了一个标识符

也许吧。但是:

  • 该标识符不是
    TransactionCell
    。或:

  • 你把它放错地方了-它不是单元格标识符。或:

  • 您忘记将序列图像板中该场景中的表视图控制器的类设置为代码所在的表视图控制器的类


我的问题是,我在身份检查器中设置了可访问性标识符,而不是在属性检查器中设置了可访问性标识符…:doh:

在Interface Builder中肯定存在设置不正确的问题。确保表视图内容设置为“动态原型”。请在此处查看一些解决方案: