Uitableview 无法将标识符为的单元格出列(可访问性标识符为的错误)
我一直在 无法将标识符为TransactionCell的单元格出列-必须为标识符注册nib或类,或连接情节提要中的原型单元格 但我不明白为什么。我在情节提要中设置了一个标识符(无法上传截图-声誉不够) 这是我的实际代码Uitableview 无法将标识符为的单元格出列(可访问性标识符为的错误),uitableview,swift,identifier,Uitableview,Swift,Identifier,我一直在 无法将标识符为TransactionCell的单元格出列-必须为标识符注册nib或类,或连接情节提要中的原型单元格 但我不明白为什么。我在情节提要中设置了一个标识符(无法上传截图-声誉不够) 这是我的实际代码 override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = self
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
- 你把它放错地方了-它不是单元格标识符。或:
- 您忘记将序列图像板中该场景中的表视图控制器的类设置为代码所在的表视图控制器的类