iOS开发:The NIB data is invalid.

今天代码调试时iOS5.0设备报:***Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The NIB data is invalid.'的错误,开发的时候一直用的iOS7.0调试的,适配iOS5.0的工作因为之前已经做完了,所以木有在意。在将追加功能弄完之后,信心满满写入iOS5.0的设备时,居然报如此错误,心哇凉哇凉滴。

既然Zombie提示原因在于NIB文件,那么就新增加的NIB文件一一排查,问题果然出在这里!

默认生成的时候这个选项是:Project Deployment Target (xx)

此选项中的xx是由程序中的BuildSetting--->iOS Deployment Target的参数决定的,如果自己强制设定的话,一定要设定到最低支持的适配版本。

像我这样不小心设定为"iOS6.0 and Later",那么在iOS5.x的设备上安装的话就会出现上述错误!


正确的设定方式如下:

也有网友出现跟我一样的错误的,但是原因如下:

I have one textview in my cell and it has attributed text even if the Text property is define as "Plain". It is not changed in "Plain". Because changes are made in text Manually and use enter keyword to go to next line. Internally it is considered as "Attributed".

So check the text property for the TextView 2 times. :)


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值