[英]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.