irmu irmu - 9 months ago 60
iOS Question

nib but didn't get a UITableView

My application works for iOS 5.1 but for iOS 6 simulator I get the following error.

Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: '-[UITableViewController
loadView] loaded the "MainListViewController" nib but didn't get a

I am subclassing
and I don't want to change it.

The tableview is created programmatically, there is a dummy
to load from
Tab Bar Controller.

I also tried to delete
, remove it from the
Tab Bar Controller, created the
in AppDelegate and added it to Tab Bar Controller as
to get rid of this nib problem, but I still get the same error.


If you have a NIB for the UITableViewController subclass then its view outlet must be hooked up to a UITableView.

You're right to delete MainListViewController.xib and do it all in code, but the reason it didn't work for you is because the old XIB will not be deleted when you build & run. So, delete the app from the simulator and try again. It should work then.