user3817163
user3817163

Reputation: 9

loaded the nib but the view outlet was not set, can't find a view outlet.

I typically manage this SIMPLE connection through the storyboard, but I have seem to hit a wall doing through a XIB. So basically I have a XIB file. Before, I made the mistake of dragging a Table View Controller to the screen. And I got this error:

A view can only be associated with at most one view controller at a time!

I then deleted the Table Controller View, and replaced it with just a UITableView. That error went away, but I have a new error:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "Photos" nib but the view outlet was not set.'

I followed this awesome post here on stack overflow, but my problem is step 7 in the very first answer is not an option for me. I do not see "View" under the outlets. What am I doing wrong? Oh, and I set the file owner's custom class to PhotosTableViewController, which is a subclass of UITableViewController. Hopefully I explained it ok for everyone. Any help is greatly appreciated. Thanks!

Upvotes: 0

Views: 1397

Answers (1)

Vishal Sharma
Vishal Sharma

Reputation: 1733

You need to give View Outlet of your main Super view To Class(Files Owner). so, Right click on your view and give its reference outlet to Your file's Owner.

Tell me if you need more help regarding it.

Upvotes: 1

Related Questions