将笔尖连接到文件所有者问题
所以我正在升级我的 iPhone 应用程序以实现通用。我升级了项目,然后为我的一个课程创建了一个新的笔尖。我将该笔尖的自定义类设置为我的 viewController 并将视图从文件所有者拖动到笔尖。一切都很好。但第二次运行它时,我收到以下错误:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the
"viewControlleriPad" nib but the view outlet was not set.'*** Call stack at first
throw:
所以我断开了视图与笔尖的连接,然后重新连接它并且它起作用了。所以基本上这个模式似乎是每次我链接它时,它就会工作一次。这看起来真的很奇怪。预先感谢您的任何帮助。
So I am upgrading my iPhone app to be universal. I upgraded the project and than created a new nib for one of my classes. I set the custom class for that nib to my viewController and dragged the view from files owner to the nib. All worked fine. But than the second time I ran it, I got the following error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the
"viewControlleriPad" nib but the view outlet was not set.'*** Call stack at first
throw:
So I disconnected view from the nib, than reconnected it and it worked. So basically the pattern seems to be every time I link it, it works once. This seems really weird. Thanks in advance for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在创建的新 XIB 中,我想您尚未将
File's Owner
的类与视图控制器的类关联起来。此外,您还没有设置文件的所有者。
希望你能明白。
如果您需要更多帮助,请告诉我。
编辑:
请参考这个问题:
Iphone sdk tabbar View Outlet was not set
编辑2:
查看对象未连接到文件所有者
In the new XIB that is created I suppose you have not associated the class of the
File's Owner
with the class of the view controllerAlso you have not set the
view
outlet of the File's Owner.Hope you get it.
If you need more help than please let me know.
EDIT:
Please refer to this question:
Iphone sdk tabbar View outlet was not set
EDIT-2:
View Objects don't connect to the File's Owner
我以前也发生过这种情况。值得尝试按以下顺序尝试以下操作:
(#2 对我有用)
This happened to me before as well. It would be worth a try to try the following in this order:
(#2 worked for me)