本文介绍了SIGABRT错误“未设置查看出口"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

尝试在iPhone 5上运行我的应用程序时收到SIGABRT错误.我的应用程序基本上需要3个视图,并且取决于您所运行的设备(iPhone 4,iPhone 5或iPad),它将启动特定于您的设备类型的视图.

I'm receiving a SIGABRT error when attempting to run my application on my iPhone 5. My application basically requires 3 views, and depending on which device you're running (iPhone 4, iPhone 5 or iPad), it will launch the view specific to your device type.

SIGABRT错误:

The SIGABRT error:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController_Portrait5" nib but the view outlet was not set.'

我几乎肯定设置了视口,但是我想我错了.

I'm almost positive that the view outlet was set, but I guess I'm wrong.

这是Xcode窗口的屏幕截图:

Here is a screenshot of Xcode window:

推荐答案

您需要连接视图"插座.看看列表中的视图"中有没有连接的项目吗?您需要确保每个UIViewController都连接到一个视图.

You need to connect the "view" outlet. See how there is an item in that list "view" with no connection? You need to ensure that every UIViewController is connected to a view.

由于您将文件命名为"portrait",所以我想您希望该视图为纵向视图,因此将"view"出口与"Objects"下的"Portrait"对象连接起来.

Since you named the file "portrait" I'm guessing that you'd like the view to be the portrait view, so connected the "view" outlet with the "Portrait" object, under "Objects."

这篇关于SIGABRT错误“未设置查看出口"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 02:59