查看插座没有设置?(Xcode)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5575049/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
View outlet was not set? (Xcode)
提问by Dan
When trying to run my iPhone app that I am currently building the build succeeds but the application crashes after the start up image and gives me an error that looks like this:
尝试运行我当前正在构建的 iPhone 应用程序时,构建成功,但应用程序在启动图像后崩溃,并显示如下错误:
2011-04-06 20:31:38.562 My App[3438:207] *Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "GalleryView" nib but the view outlet was not set.'
2011-04-06 20:31:38.562 我的应用程序 [3438:207] *由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“-[UIViewController _loadViewFromNibNamed:bundle:] 加载了“GalleryView”笔尖,但视图插座是没有设置。'
I cannot figure out whats going on here.. Please help!
我无法弄清楚这里发生了什么.. 请帮忙!
回答by Ken Pespisa
In Interface Builder, with the GalleryView.xib file open, make sure you CTRL+drag from your File's owner to your view and set the file's owner view outlet.
在Interface Builder 中,打开GalleryView.xib 文件,确保您按住CTRL+从文件所有者拖动到您的视图并设置文件的所有者视图出口。