简体   繁体   中英

iOS Objective-C App crashing for unusual reason

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!

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. 在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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