IOS 笔记之错误收集

1.报错: "OBJC_CLASS$_TableViewController", referenced from:

clang: error: linker command failed with exit code 1 (use -v to see invocation)
原因:类可以import也可以打代码,但是找不到,是因为没有参与编译,可能是新建类的时候没有勾选target
解决:选中对应的target点build phases 第二个下面没有它,把它加进去就可以了

2.报错:[<TestAudioPlayerViewController 0x198620> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key w.'
原因:在xib中某个控件已经通过outlet连接到ViewController中的某个变量上了,后来变量删除了,但是这种连接关系没有删除,导致启动时找不到对应的key,抛出上述exception
解决:把多的线删掉

3.报错:unable to dequeue a cell with identifier cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard
原因:没有register。
解决:[self.tableView register...]

4.报错:Could not find a storyboard named 'Main'
原因:想手写代码删了storyBoard没删除main
解决:target下Development Info 下 main interface 删除main

5.报错:linker command failed with exit code 1
"duplicate symbol OBJC_METACLASS$_类名 in:"错误
原因:
1.90%都是因为#import了.m文件
2.其他可能是因为项目中存在了2个一样的.m文件
解决:删改

6.报错:Unknown class in Interface Builder
原因:没有把storyBoard和对应的类联系起来

7.报错:'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (6) must be equal to the number of rows contained in that section before the update (6), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'
原因:删除单元格时应该先修改数据模型再删除

8.模拟器是黑的
原因:1.没有加makeVisible
2.没有把storyBoard里的箭头指向某个C

9.报错:Push segues can only be used when the source controller is managed by an instance of UINavigationController.
原因:第一个的箭头应该指向navi而不是第一个VC,这样都没有navibar

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值