NSInternalInconsistencyException - 无法在bundle中加载NIB [英] NSInternalInconsistencyException - Could not load NIB in bundle

查看:156
本文介绍了NSInternalInconsistencyException - 无法在bundle中加载NIB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到以下异常:

 Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/57C8544B-05F6-445D-80A9-FAC9672F278B/MyApp.app> (loaded)' with name 'MyNibName''

我在stackoverflow的类似问题中尝试了多种解决方案,但仍然遇到此问题。

I tried number of solutions suggested in stackoverflow's similar questions, but still getting this issue.

此问题与特定的xib文件一起加载地址簿。

This issue is with particular xib file which loads address book.

这只发生在iPhone而不是iPad和模拟器上。

This occurs only on iPhone and not on iPad and simulator.

我也尝试删除现有的xib文件并创建一个新的但没有成功。

I also tried deleting the existing xib file and creating a new one but didnt work out.

With few attempts of testing, I found that the file works fine for certain number of attempts and then starts giving above error only on iPhone.

请帮忙。

提前致谢。

推荐答案

经过长时间的调试和测试后,我发现了这个问题。问题不在于NIB文件,而是我用两个nsmutablearrays声明并填充但不使用它们。我删除了它们然后它工作了。这对我来说有点奇怪。

Finally after long debugging and testing, I found the issue. The issue was NOT with NIB file, but it was with two nsmutablearrays that I had declared and was populating but not using them. I removed them and then it worked. This was bit strange for me.

这篇关于NSInternalInconsistencyException - 无法在bundle中加载NIB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆