Iphone sdk tabbar View outlet未设置 [英] Iphone sdk tabbar View outlet was not set

查看:219
本文介绍了Iphone sdk tabbar View outlet未设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正忙着这个疯狂的项目!!!!!!!

I'm about at the end of my rope with this freaking project!!!!!!!

我有一个链接到笔尖的UIViewController类它有一个带有2个标签的tabbar控制器。两个选项卡都加载nib文件。当我编译时,我得到一个错误:

I have a UIViewController class that is linked to a nib that has a tabbar controller with 2 tabs. Both tabs load nib files. When I compile I get an error:

- [UIViewController _loadViewFromNibNamed:bundle:]加载了MainViewController笔尖,但未设置视图插座

这里发生了什么? MainViewController视图正在由nib文件填充(并且这些文件视图正确链接).MainViewController的Files的所有者有一个参数view但不应该被忽略,因为我从一个nib加载两个视图?任何帮助将不胜感激!

What's going on here? MainViewController views are being populated by nib files (and those files views are linked correctly).MainViewController's Files's Owner has a parameter "view" but shouldnt that be ignored since Im loading both views from a nib? ANY help would be appreciated!

推荐答案

我遇到了同样的错误(加载了xViewController笔尖,但未设置视图插座。)在调试器中。

I had the same error (loaded the "xViewController" nib but the view outlet was not set.) in the debugger.

在Interface Builder中,我打开了xViewController.xib,右键单击了View图标,从New Referencing Outlet旁边的圆圈拖到了文件的所有者图标,然后,当出现小灰色菜单时,我点击了视图。 (然后保存,重建,运行等......)

In Interface Builder, I opened the xViewController.xib, right-clicked the View icon, dragged from the circle beside New Referencing Outlet over to the File's Owner icon, then, when the small gray menu appeared, I clicked view. (Then save, rebuild, run, etc...)

我不知道发生了什么,但是修复了它。

I'm not clear on what's going on, but that fixed it.

根据我的理解,如果有人想要跟进,View的插座(名为view)未设置,并通过将New Referencing Outlet拖动到File的Owner图标,我设置了View的插座。很棒。

From what I understand, if anybody wants to follow-up, the View's outlet (which is named "view") was not set, and by dragging the New Referencing Outlet over to the File's Owner icon, I set the View's outlet. Great.

这篇关于Iphone sdk tabbar View outlet未设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆