我在應用程序中實現了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
TableView CoreData錯誤:在...中的斷言失敗在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
感謝您的快速回答!現在我在CoreData庫中獲得了一個斷點。但它似乎工作。我更遠了一步。 – hom 2014-11-21 13:23:40