1
votes

I am using 'else if' statements to have the cells of a table open various views for my app. The problem is, whenever I use the pushViewController declaration I get a "Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle

else if ([[listData objectAtIndex:indexPath.row] isEqual:@"Poison Control Center"]){

    emergencynumberspoisoncontrol_viewcontroller *poison = [[emergencynumberspoisoncontrol_viewcontroller alloc] initWithNibName:@"emergencynumberspoisoncontrol_viewcontroller" bundle:nil];
    [self.navigationController pushViewController:poison animated:YES];
1
Either the named xib is missing, or, more likely, there's something wrong with it. Xcode has several ways to muck up xibs, and I'm sure that users have invented a hundred more. Sometimes you have to essentially recreate the xib from scratch.Hot Licks

1 Answers

1
votes

That can happen for a lot of reasons, but the most common is you connected an outlet or action from the xib and then renamed or removed the target from your class.

Look at all the connections in the xib and see if any have little exclamation marks.

It'll also happen if you rename classes and some other less likely things.