View outlet was not set? (Xcode)

Dan picture Dan · Apr 7, 2011 · Viewed 7.3k times · Source

When trying to run my iPhone app that I am currently building the build succeeds but the application crashes after the start up image and gives me an error that looks like this:

2011-04-06 20:31:38.562 My App[3438:207] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "GalleryView" nib but the view outlet was not set.'

I cannot figure out whats going on here.. Please help!

Answer

Ken Pespisa picture Ken Pespisa · Apr 7, 2011

In Interface Builder, with the GalleryView.xib file open, make sure you CTRL+drag from your File's owner to your view and set the file's owner view outlet.