【发布时间】:2014-11-21 13:04:32
【问题描述】:
我在我的应用中实现了 Core Data。
如果我运行它,我会收到以下错误:
2014-11-21 13:29:28.400 MyApp[2630:37096] *** Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableView.m:6116
我不知道我做错了什么(我还在学习 swift)。
这是发生错误的函数:
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell:MyTableViewCell = tableViewNotes.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as MyTableViewCell
cell.textLabel.text = "\(daten[indexPath.row].aufgabe)"
return cell
}
以及发生错误的行:
var cell:MyTableViewCell = tableViewNotes.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as MyTableViewCell
【问题讨论】:
标签: ios uitableview core-data swift