My application works for iOS 5.1 but for iOS 6 simulator I get the following error.
Terminating app due to uncaught exception \'NSInternalInconsist
Please connect your table view as a View outlet.outlet must be hooked up to a UITableView.
I have same problem and after waste 3 hours i find it out..."this is mistake" i use tableviewcontroller class and give uiviewcontroller reference of this class, instead of view controller class i take tableviewcontroller class as i take uiviewcontroller in storyboard. so delete tableviewcontroller class and paste your code of tableviewcontroller class to view controller class,"not paste whole code only paste logic" after this in storyboard in identity inspector give class reference of current view controller class.
I had a similar problem using storyboards. I'll post my solution for the benefit of others. The key is that if you have correctly set the file's owner to the subclass of UITableView you still have to make sure the view property is set to the Table View. I'm using storyboards, but the same sort of thing should apply to nibs as well. Expand the "document outline" so you can see the hierarchy of your storyboard. I will include some screen shots below. The quick way to solve this is that you want to look at your view in the document outline. Delete any tableview you have as a child of it. Drag the other tableview on top of the view property. Done. I'll show you in screen shots.
Notice the two tables. You want to remove table1 and its cell.
Good. Now drag table2 to the view and you're done. Should work now. Basically if you have a subclass of UITableViewController then it must have Table View in place of view or it will crash.
There is several reason why this may occur.
You may have not have added UITableViewDelegate & UITableViewDataSource to your .h
@interface TableController : UIViewController {
You may have not connected your declared outlets to the components in the Storyboard/Nib
You maybe calling a UIViewController instead of a UITableView or vide verser in your .h
@interface TableController : UIViewController
or
@interface TableController : UITableViewController
I had this problem and solving it was just one simple thing.
Keep the nib if you already created ...
Go to (XIB file) and add a tableView component from objects library to the XIB file's iPhone screen, and it should work :)
@smileBot answer helped me realized the solution is very easy and the error raised by iOS makes sense
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "MainListViewController" nib but didn't get a UITableView.'
Their basically saying that nib's view controller is not returning a UITableView because it isn't, for most - your nib is returning a View - which is created for you by default when you create a new ViewController in the Xcode IDE.
The solution is as simple as deleting that View - which might feel against the norm - but go ahead and select it and backspace - then drag and drop a UITableView inside your ViewController and this UITableView will now act as your root view inside your TableViewController.
Keep in mind this is only necessary for classes directly subclassing UITableViewController.
Good luck.