I am getting this error:
'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier NavigationNodeCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
I am using two cells with the same class "NavigationItemCell" and two identifiers "NavigationNodeCell" and "NavigationLinkCell".
And I create a cell with e.g.:
let cell: NavigationItemCell = self.tableView.dequeueReusableCellWithIdentifier("NavigationNodeCell", forIndexPath: indexPath) as! NavigationItemCell
This problem has been there before me, e.g. Assertion failure in dequeueReusableCellWithIdentifier:forIndexPath:
As I understand (e.g. the anser of Sebastian Borggrewe) it should be enough to register a UITableViewCell in the story board with its custom class and an identifier.
That's exactly what I did and I am still getting this error. I tried to use two different classes but it did not solve the error. I also tried to register my cells with nib but there I am running into other issues (label is nil).
I've found that this problem probably occures because I instanciate a new table view controller programmatically.
var newController = MyTableViewController()
Does it mean I will have to register nibs anyway? Is it a problem that I will have to register the same class twice? And how do I avoid the problem of the nil label?