无法加载捆绑包中的 NIB
我不知道为什么会收到此错误:
** 由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“无法在捆绑包中加载 NIB:”NSBundle <; /Users/用户名/Library/Application Support/iPhone Simulator/4.2/Applications/D49DC6F2-7AE0-4BBD-97FB-AB9D869C48FE/Fish Quiz.app> (已加载)',名称为'Taxo2ViewController'' *
我检查了有关此错误的所有类似帖子,但我的应用程序仍然生成此错误。我检查了所有的 nib 文件,检查了它们的类型,它们都很相似。
我的应用程序是一个测验;我每轮有 5 个问题。回答超过 45 轮问题后会出现此错误。我想知道为什么会发生这种情况,即使我的应用程序一开始可以工作。请帮我解决这个问题。
谢谢大家!干杯! 金
I don't know why I'm getting this error:
** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle < /Users/username/Library/Application Support/iPhone Simulator/4.2/Applications/D49DC6F2-7AE0-4BBD-97FB-AB9D869C48FE/Fish Quiz.app> (loaded)' with name 'Taxo2ViewController'' *
I checked all of the similar posts regarding this error but still my app generate this error. I checked all of my nib files, checked their types and they are all similar.
My app is a quiz; I have 5 questions each round. This error occurs after answering 45+ rounds of questions. I wonder why this is happen even though my app works at first. Please help me with this.
Thanks Everyone! Cheers!
Kim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保正确编写代码。再看一遍,看看有没有错误。
Make sure to write your code correctly. Take a look at it again and see if there are mistakes.
我看到了您在上面的链接中提供的代码。我发现上面第一个链接中给出的 goToNext 函数存在问题。你所做的是,你有一个视图控制器有两个 xib 文件,也就是说你的 TaxO2ViewController 有两个 xib 文件。因此,在这两个 xib 文件中,所有者应该是您的 TaxO2ViewController,并且 TaxO2ViewController 的 view 属性应该绑定到这两个 xib 文件。也许你还没有这样做。
I seen your code you provided in the links above. I found problem in your goToNext function given in first link above. What you have done is, you are having one view controller having two xib files, that is your TaxO2ViewController has two xib files. So in each of these two xib files the owner should be your TaxO2ViewController and the view property of TaxO2ViewController should be bound to both of this xib files. Probably you do not have done that.