3

I've a problem in Xcode. Every time I run my app in Simulator, the app is stopped in a black screen view and the debugger write this code:

2012-07-04 11:54:08.348 myApp[661:f803] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "myappViewController" nib but the view outlet was not set.'

Searching through the web I've read to set the link between view and View in Outlets.

For "File's Owner" -> "Connections inspector" -> "Outlets" I have linked view to View.

The result is always the same. Same error.

There's another way to bypass this problem?

Thanks everyone

Nate
  • 31,017
  • 13
  • 83
  • 207
chattago2002
  • 45
  • 2
  • 15
  • Did you try clean/remove app/rebuild? Is the File's Owner "myappViewController"? – vakio Jul 04 '12 at 10:52
  • I tried to create a new app and I have the same problem... now i begin to think I forget to do something. myappViewController is the custom class of file's owner – chattago2002 Jul 04 '12 at 13:22
  • Restart XCode/Simulator or computer.. I don't know what's wrong if it's happening in a new project. – vakio Jul 04 '12 at 13:28
  • I've copied my code (from "myappViewController.h" and "myappViewController.m") to a new project, but not changing app configuration. only copy/paste of the code. I want to understand this situation so it could be useful in the future – chattago2002 Jul 04 '12 at 13:49
  • @chattago2002 Did you ever find a solution to this problem? I have the same issue. – fi12 Jul 27 '17 at 13:07

1 Answers1

0

try to select file's owner in interface builder select tab number three in the property inspector (called Identity Inspector in the hover-over help) and make sure the Custom Class property is set to 'myappViewController'

Also check that root UIView is hooked up to 'File's owner' by selecting your root view in Interface Builder select the last tab in the property inspector (called Connection Inspector in the hover-over help) and check the Referencing Outlets.

remember to check that casing of names matches in both places.

EsbenB
  • 3,356
  • 25
  • 44
  • 1
    the Custom Class is correctly set to myappViewController and the root UIView is hooked to File's Owner. I receive the same error... I can't understand why there is this problem... – chattago2002 Jul 04 '12 at 13:19