Reputation: 513
I am writing an app for iOS.
I press on run and my app crashes on launch, I get this error on the console.
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MainView" nib but the view outlet was not set.'
Please help me how to solve it.
Upvotes: 1
Views: 519
Reputation: 14662
Basically in your "MainView" nib, you need to link your File Owner
(that represents your view controller object) and the view you created in your NIB. The name of that link is "view".
To actually make that link, you just need to press the control key on your keyboard and then click-drag the view you created to the File Owner
, and then select the "view" outlet.
Upvotes: 3