问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/11327239/error-in-xcode-the-view-outlet-was-not-set