Loaded nib but the 'view' outlet was not set

Here's what worked for me:

  • Open the XIB file causing problems
  • Click on file's owner icon on the left bar (top one, looks like a yellow outlined box)
  • If you don't see the right-hand sidebar, click on the third icon above "view" in your toolbar. This will show the right-hand sidebar
  • In the right-hand sidebar, click on the fourth tab--the one that looks a bit like a newspaper
  • Under "Custom Class" at the top, make sure Class is the name of the ViewController that should correspond to this view. If not, enter it
  • In the right-hand sidebar, click on the last tab--the one that looks like a circle with an arrow in it
  • You should see "outlets" with "view" under it. Drag the circle next to it over to the "view" icon on the left bar (bottom one, looks like a white square with a thick gray outline
  • Save the xib and re-run

This is Josh Justice proposal, but in a graphical way (pictures are mine):

  1. Select File owner
  2. On right hand side panel select custom class.
  3. Enter the custom class name

enter image description here

  1. On right hand side panel select oultets
  2. Drag view outlet to view component

enter image description here

Finally the View Controller is instantiated with the rolling code:

        PTFilterUserVC *aFilterUserVC = [[PTFilterUserVC alloc] initWithNibName:@"FilterVC" bundle:nil];

        //OPTIONAL.This is how 'I' am interested in present the view controller.
        [self.navigationController pushViewController:aFilterUserVC animated:YES];