问题
My app is crashing with the error code: SIGABRT. Ive done a ton of research and none of the "SIGABRT solutions" have ever helped. This is what is in the console after app crashes on the iOS Simulator:
Terminating app due to uncaught exception
'NSInternalInconsistencyException',
reason: '-[UIViewController _loadViewFromNibNamed:bundle:]
loaded the "ViewController" nib but the view outlet was not set.'
If anyone can help me that would be great!
回答1:
Open up your ViewController's xib file, right click on the File's Owner placeholder, and make sure that your view property is set. If it's not, control click and drag to the view.
回答2:
The error is exactly what it says it is. The view outlet in your ViewController.xib is not set to anything. Open up the xib and connect the top level view to the ViewController's view outlet.
来源:https://stackoverflow.com/questions/9123361/ios-objective-c-app-crashing-for-unusual-reason