I get this error message: failed to obtain a cell from its dataSource
The strange that
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
not even get called, problem is not that returned cell is nil. I put in breakpoints. cellForRowAt
not get called.
numberOfRowsInSection
returns value.
I do not know it is relating or not, but now I do not use UITableViewController
, I just have a UIViewController
, and it is the datasource
and delegate
for the UITableView
. I hope it can not cause interfere. Any idea?
Cross check below check list:-
ViewController declaration
.class DataViewController: UIViewController, UITableViewDataSource, UITableViewDelegate