'UITableView' falhou ao obter uma célula de seu dataSource
Atualizei o Xcode e, desde então, tenho problemas com meu banco de dados. código:
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
}
O erro que recebo é:
Finalizando o aplicativo devido à exceção não capturada 'NSInternalInconsistencyException', motivo: 'UITableView (; layer =; contentOffset: {0, -64}; contentSize: {375, 65802}>) falhou ao obter uma célula do dataSource ()