iOS Objective-C App crashing for unusual reason

ぐ巨炮叔叔 提交于 2019-12-13 10:27:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!