无法在捆绑中加载NIB:'NSBundle' [英] Could not load NIB in bundle: 'NSBundle'
问题描述
下面列出的错误是什么?
What is the error listed below?
2011-02-23 21:24:12.218成功[7238:207] * 由于未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'无法在bundle中加载NIB:'NSBundle< / Users / jimkillen12 / Library / Application Support / iPhone Simulator / 4.2 / Applications / BAA5E0E7-AF12 -4301-A4F8-1B9797C9E82D / Success.app>(已加载)'名称为'MainWindow-iPad''
2011-02-23 21:24:12.218 Success[7238:207] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/jimkillen12/Library/Application Support/iPhone Simulator/4.2/Applications/BAA5E0E7-AF12-4301-A4F8-1B9797C9E82D/Success.app> (loaded)' with name 'MainWindow-iPad''
推荐答案
项目中缺少一个NIB文件,添加所需的NIB文件:
One of your NIB file is missing from project, add the required NIB file:
在构建阶段
- 展开复制捆绑资源
- 点击底部的
+
- 添加所需的NIB文件。
按 Shift + Cmd + K <清除构建
,然后运行。
PS 还要确保使用NIB文件的确切拼写同时调用 initWithNibName:@V iewNameController
可能,您已通过小写字母或者您可能还包括扩展名.xib,这不是必需的。
Probably, you have named your NIB in a call by lowercase letters or you may have also included extension .xib which is not required.
这篇关于无法在捆绑中加载NIB:'NSBundle'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!