Xcode "-[UIViewController _loadViewFromNibNamed:bundle:] loaded the nib but the view outlet was not set." error

Are you sure you have a UIView (or subclass) assigned to the "view" property of PonyboardViewController? Right click on "File Owner" in the left pane of the xib for PonyboardViewController and verify that the "view" outlet is set.

If not, set it to a view!


I just have the same problem as you, so I fixed it like that: this is my code block:

self.chatsView = [[ChatsView alloc] initWithNibName:@"ChatsView" bundle:nil];

I click ChatsView.xib to find the "File's owner", then hover my mouse over the "File's owner", and right click, that will prompt something like this:

The unconnected 'view' outlet

you must drag the "view" Outlet to connect to the View which have two subViews: Search Bar&Table View in my xib file.

The connected 'view' outlet


Your problem probably lies with the XIB or Stroyborad scene. Check whether the View is connected properly to the class.

I've tried, and it works fine for me after doing it.