0
votes

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!

1
Where are you looking for this outlet? It should be on the File's Owner whose class you set to PhotosTableViewControllerAlex Zielenski
Correct. I am looking at the File's Owner tab inside of the .Xib. Do I need a tableDataSource outlet inside of my PhotosTableViewController?user3817163

1 Answers

1
votes

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.