无法加载捆绑包中的 NIB

发布于 2024-12-02 06:15:54 字数 491 浏览 2 评论 0原文

我不知道为什么会收到此错误:

** 由于未捕获的异常“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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半夏半凉 2024-12-09 06:15:54

确保正确编写代码。再看一遍,看看有没有错误。

Make sure to write your code correctly. Take a look at it again and see if there are mistakes.

海未深 2024-12-09 06:15:54

我看到了您在上面的链接中提供的代码。我发现上面第一个链接中给出的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文