简体   繁体   English

iOS Objective-C App因异常原因崩溃

[英]iOS Objective-C App crashing for unusual reason

My app is crashing with the error code: SIGABRT. 我的应用程序崩溃,错误代码:SIGABRT。 Ive done a ton of research and none of the "SIGABRT solutions" have ever helped. 我已经做了大量研究,但“ SIGABRT解决方案”都没有帮助。 This is what is in the console after app crashes on the iOS Simulator: 这是iOS模拟器上的应用程序崩溃后控制台中的内容:

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! 如果有人可以帮助我,那就太好了!

Open up your ViewController's xib file, right click on the File's Owner placeholder, and make sure that your view property is set. 打开ViewController的xib文件,右键单击“文件的所有者”占位符,并确保已设置view属性。 If it's not, control click and drag to the view. 如果不是,请控制单击并拖动到视图。 在此处输入图片说明

The error is exactly what it says it is. 该错误正是它所说的。 The view outlet in your ViewController.xib is not set to anything. ViewController.xib中的视图出口未设置为任何内容。 Open up the xib and connect the top level view to the ViewController's view outlet. 打开xib并将顶层视图连接到ViewController的视图出口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM