I have an UITableViewController that Ive pulled out in story board and made a custom UITableViewController class to control it. The table is loaded correctly but when a cell is selected a segue is supposed to be preformed to a ViewController but instead the app crashes and I get this:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "lZs-yn-NHN-view-Nia-cR-yrl" nib but didn't get a UITableView.'
The UITableViewController is preceded by a tabViewController and a NavigationController in story board if that is affecting anything. This code runs but after this the app crashes:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"DisplayMovieFromAllMovies"]) {
NSIndexPath * indexPath = [self.tableView indexPathForCell:sender];
NSString * sectionHeader = [self.headerArray objectAtIndex:indexPath.section];
NSDictionary * selectedMovieDict = [[self.movieSortedDict objectForKey:sectionHeader] objectAtIndex:indexPath.row];
NSLog(@"selected: %@", [selectedMovieDict objectForKey:@"title"]);
[segue.destinationViewController setMovieDict:selectedMovieDict];
}}
Maybe I wired something incorrectly up in storyboard.