Xcode xibwen文件的常见几个问题

来源:互联网 发布:csi网络分集剧情 编辑:程序博客网 时间:2024/04/29 06:03

1.控件放在了Cell外部
报错原因 reason: ‘invalid nib registered for identifier (FirstTableViewCell) - nib must contain exactly one top level object which must be a UITableViewCell instance’这里写图片描述
2..同一个控件上重复连线, 删除黄色警告就好
报错原因 reason: ‘[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key label.这里写图片描述

  1. 数据类型不匹配 reason: -[__NSCFNumber length]: unrecognized selector sent to instance 0xb000000000000012’

  2. 没有被导航控制器管理 reason: ‘Push segues can only be used when the source controller is managed by an instance of UINavigationController.’

  3. 错引了 *.m 文件
    这里写图片描述
    注意提示 duplicate 末尾的SecViewController.o 查找此字段, 就可以找到错误之处

0 0