"View outlet was not set" help

Discussion in 'iOS Programming' started by lexk, Apr 7, 2013.

  1. lexk macrumors newbie

    Joined:
    Aug 8, 2010
    #1
    Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController" nib but the view outlet was not set.'

    I'm getting this error thrown at me when I try and run my app in the simulator and I'm a little thrown on how to go about fixing it.
    I'm working with storyboards as well if that's any help.

    I'm fairly new at all this so any advice on how to overcome this would be greatly appreciated! :)
     
  2. Sonnestah macrumors regular

    Joined:
    Mar 2, 2013
    #2
    A few suggestions:

    1 - Try a clean

    2 - Under the info tab in the inspector, check if the name matches

    3 - Check your code for typos
     
  3. lexk thread starter macrumors newbie

    Joined:
    Aug 8, 2010
    #3
    Thanks, but nothing stands out still
     
  4. Sonnestah macrumors regular

    Joined:
    Mar 2, 2013
    #4
    you mentioned you're using storyboard, select your view controller and check the connections inspector for the view outlet, is it linked?
     
  5. lexk thread starter macrumors newbie

    Joined:
    Aug 8, 2010
    #5
    As far as I can tell they are connected although greyed out and uneditable.
     
  6. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #6
    What do you mean they? There is only one outlet named "view" for each view controller. This is the same as "self.view" that you can access in code.

    Can you show us a screen shot that proves that the "view" outlet is set?
     

Share This Page