I added a new nib file to my project, and tried to load it.
However, when I click on the toolbar icon that is supposed to take me to the view that I created, I get an NSInternalInconsistencyException
with the message:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "..." nib but the view outlet was not set.'
So I opened up my nib file, and I see for the view that there are no referencing outlets set. However, I try to click and drag the circle for "new referencing outlet" to File's Owner, but it won't let me...what do I need to do to get my view to display?
This is Josh Justice proposal, but in a graphical way (pictures are mine):
Finally the View Controller is instantiated with the rolling code:
PTFilterUserVC *aFilterUserVC = [[PTFilterUserVC alloc] initWithNibName:@"FilterVC" bundle:nil];
//OPTIONAL.This is how 'I' am interested in present the view controller.
[self.navigationController pushViewController:aFilterUserVC animated:YES];
Here's what worked for me:
I can generally fix it by remaking the connection between File's Owner and the view. Control-drag from the File's owner to your View (in IB) and select view from the pop-up menu.
The View Identity - Class Identity was not set. After setting it to the appropriate class, the issue was resolved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With