Marcus
Marcus

Reputation: 13

"Terminating app due to uncaught exception 'NSInternalInconsistencyException'" error message

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];

Upvotes: 1

Views: 971

Answers (1)

Stripes
Stripes

Reputation: 4229

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.

Upvotes: 1

Related Questions