简体   繁体   English

尝试在iPad上加载视图时出现异常:“加载笔尖但未设置视图插座”,如何添加该插座?

[英]Exception when trying to load view on iPad: “loaded the nib but the view outlet was not set”, how do I add that outlet?

I get this exception: 我得到这个例外:

Objective-C exception thrown. 抛出Objective-C异常。
Name: NSInternalconsistencyException 名称:NSInternalconsistencyException
Reason: - [UIViewController_loadViewFromNibNamed:bundle:] loaded the "TestRunnerViewController_iPad" nib but the view outlet was not set. 原因: - [UIViewController_loadViewFromNibNamed:bundle:]加载了“TestRunnerViewController_iPad”笔尖,但未设置视图插座。

Sure enough, if I inspect the iPhone view I created first, I can see this: 果然,如果我先查看我创建的iPhone视图,我可以看到:

在工作视图中查看插座

But, in the one that crashes, an iPad view for the same controller that I added manually, this outlet does not exist, and I can't figure out how to add it. 但是,在崩溃的那个,我手动添加的同一个控制器的iPad视图,这个插座不存在,我无法弄清楚如何添加它。 I've looked under File's Owner, same place where I found the outlet on the working view, but I can't figure out where to drag the "new referencing outlet" connector, it doesn't seem to link up with anything: 我查看了File的Owner,在工作视图上找到插座的同一个地方,但是我无法弄清楚在哪里拖动“新的引用插座”连接器,它似乎没有链接任何东西:

崩溃视图的出口

So, the question is simple. 所以,问题很简单。 How do I add the required view outlet to my new view? 如何在新视图中添加所需的视图插座?

Note that I'm using MonoTouch/MonoDevelop, but since this is a question related to Xcode Interface Builder 4, I doubt that is relevant. 请注意,我正在使用MonoTouch / MonoDevelop,但由于这是一个与Xcode Interface Builder 4相关的问题,我怀疑这是否相关。

您是否为文件所有者设置了类类型?

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

相关问题 “加载的笔尖,但视图插座没有设置”例外 - “loaded nib but the view outlet was not set” exception 已加载笔尖但未设置“查看”插座 - Loaded nib but the 'view' outlet was not set 已加载笔尖但未设置视图插座 - Swift 版 - Loaded nib but the view outlet was not set - Swift edition 加载了nib文件,但未设置视图插座 - Loaded the nib file but the view outlet was not set iOS帮助:加载笔尖但未设置视图插座 - iOS Help: loaded the nib but the view outlet was not set 加载的笔尖但未设置视图插座 - UITableViewController - Loaded nib but the view outlet was not set - UITableViewController iOS Framework-已加载笔尖,但未设置视图出口 - iOS Framework - Loaded the nib but the view outlet was not set UIViewController _loadViewFromNibNamed:bundle:加载了“View”笔尖,但未设置视图插座。 - UIViewController _loadViewFromNibNamed:bundle: loaded the “View” nib but the view outlet was not set.' “加载了”XXX“笔尖,但未设置视图插座。” - 再次 - “loaded the ”XXX“ nib but the view outlet was not set.” - again 以编程方式创建的UIViewController在“已加载笔尖但未设置视图出口”时崩溃 - Programmatically-created UIViewController crash on “loaded nib but the view outlet was not set”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM