iOS 【invalid nib registered for identifier(Cell)】
来源:互联网 发布:php项目开发实战密码 编辑:程序博客网 时间:2024/06/14 12:41
在写 UITableView 的时候,注册 cell 大家可能遇到过这样的错误信息:
"* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'invalid nib registered for identifier (Cell) - nib must contain exactly one top level object which must be a UITableViewCell instance'"
翻译:
无效的 nib 注册标识符(重要符号),nib 必须包含一个顶级对象,它必须是一个 UITableViewCell 实例'
所以,通过 xib 创建 cell 的时候 一定要注意!该错误是在 xib 中的 cell 的同一层级出现了其他的控件,检查一下 xib 中左边的层级关系,让 cell 的 view 是唯一的控件就可以了。
但是,查看了一下,确实除了 Cell 这个 View 并没有其他的 View。然后我打印这个 xib 的元素发现:
确实存在额外的元素。那就是我在 Cell 的子控件上面添加了一个 Tap 手势,这个手势是与 Cell 平级显示在左侧的。删了手势就没什么问题了。
2 0
- iOS 【invalid nib registered for identifier(Cell)】
- iOS reason: 'invalid nib registered for identifier (GroupMustKnowViewCell)
- 自定义cell的时候出现的错误(用的nib而不是storyboard)invalid nib registered for identifier ((null)) - nib must contain
- invalid nib registered for identifier。。。nib must contain exactly one top level
- unable to dequeue a cell with identifier cell - must register a nib or a class for the identifier or
- unable to dequeue a cell with identifier xxx - must register a nib or a class for the identifier
- unable to dequeue a cell with identifier - must register a nib or a class for the identifier...问题
- UITableViewCell unable to dequeue a cell with identifier Cell - must register a nib or a class for t
- must register a nib or a class for the identifier or connect a prototype cell in a storyboard'的解决办法
- unable to dequeue a cell with identifier Identify - must register a nib or a class for the identifie
- iOS开发:The NIB data is invalid.
- TableView unable to dequeue a cell with identifier Cell - must register a class or Nib
- unable to dequeue a cell with identifier xxx - must register a nib or a class fo
- iOS菜鸟学习——通过nib文件自定义Cell
- UITableView 的一个常见错误'unable to dequeue a cell with identifier Cell - must register a nib or a class f
- 从nib加载cell,创建cell为nib
- iOS: 'The NIB data is invalid' exception with Xcode 4.5(真机出现的问题)
- swift写一个简单的列表unable to dequeue a cell with identifier reuseIdentifier - must register a nib or a cla
- jquery的ajax实现jsonp
- Unix传奇(下篇)
- 河南省第七届省赛 问题 F: Turing equation 水题
- Linux打卡Day5
- hadoop中the authenticity of host 'ubuntu (127.0.1.1)' can't be established
- iOS 【invalid nib registered for identifier(Cell)】
- Linux下守护进程
- 【秒懂设计模式】总述及工厂模式
- Java设计模式—观察者模式
- 算法作业_18(2017.4.26第十周)
- Float Vs Double
- LeetCode:Linked List Cycle
- 简单的list查询转换为tree结构
- 嵌套的盒子(居中)