Reputation: 596
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'WebViewController''
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if(self.webViewController == nil) {
self.webViewController = [[WebViewController alloc] initWithNibName:@"WebViewController"
bundle:[NSBundle mainBundle]];
}
}
Thanks.
Upvotes: 0
Views: 143
Reputation:
Check the following,
WebViewController.xib exists in your project and spelled correctly in code, check the xib name is same as in your code. If file not exist, add it. If misspelled, update the code.
It is listed in Copy Bundle Resources; if not add it.
Upvotes: 0
Reputation: 1162
I think, you have not chosen the target membership for your nib file. Tap on your nib file & check the Target membership for your nib file.
Upvotes: 2
Reputation: 8954
That's because the nib file with name WebViewController is missing in your bundle.
To make WebViewController.nib be produced in your bundle, you need to create a .xib interface file with name WebViewController.
Upvotes: 0