«UITableView» не смог получить ячейку из своего источника данных
Я обновил Xcode, и с тех пор у меня возникли проблемы с базой данных. код:
override func numberOfSections(in tableView: UITableView) -> Int {
// return the number of sections
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
// return the number of rows
return leadItems.count
}
func cellForRow(at indexPath: IndexPath) -> UITableViewCell?
{
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! LeadsTableViewCell
// Configure the cell...
cell.user_name_label.text = leadItems[indexPath.row].user_name
cell.school_name_label.text = leadItems[indexPath.row].school_name
return cell
}
Я получаю ошибку:
Завершение работы приложения из-за невыполненной исключительной ситуации NSInternalInconsistencyException, причина: «UITableView (; layer =; contentOffset: {0, -64}; contentSize: {375, 65802}>) не удалось получить ячейку из своего dataSource ()