unable to dequeue a cell with identifier xxx - must register a nib or a class fo
来源:互联网 发布:生存之民工 知乎 编辑:程序博客网 时间:2024/06/05 23:49
问题如下:
最近自定义Cell 出现不少问题,一般都是由于没有进行注册
下面是我遇到的,写的基本上同样的自定义Cell这个运行就报下面的错误。
解决方法:
方法一:
将方法
dequeueReusableCellWithIdentifier: forIndexPath:
替换成方法
dequeueReusableCellWithIdentifier:
方法二:
在方法
dequeueReusableCellWithIdentifier: forIndexPath:
的前面添加方法
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:reuseIdentifier];
如果是自定义cell的话,若类名为
xxxxcill
,那么添加的方法将改为[self.tableView registerClass:[xxxxcell class] forCellReuseIdentifier:reuseIdentifier];
0 0
- unable to dequeue a cell with identifier xxx - must register a nib or a class fo
- unable to dequeue a cell with identifier xxx - must register a nib or a class for the identifier
- TableView unable to dequeue a cell with identifier Cell - must register a class or Nib
- 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 - 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
- unable to dequeue a cell with identifier Identify - must register a nib or a class for the identifie
- UITableView 的一个常见错误'unable to dequeue a cell with identifier Cell - must register a nib or a class f
- swift写一个简单的列表unable to dequeue a cell with identifier reuseIdentifier - must register a nib or a cla
- must register a nib or a class for the identifier or connect a prototype cell in a storyboard'的解决办法
- Xcode error: unable to dequeue a cell with identifier cell
- Xcode unable to dequeue a cell with identifier
- UITableView使用注意事项(unable to dequeue a cell with identifier)
- 哈02—kill error_______unable to dequeue a cell with identifier Cell
- iOS 如何解决'could not dequeue a view of kind: UICollectionElementKindCell with identifier cell
- Subscriber class xxx already register a Eventxxx
- how to register a cell for UITableViewCell
- Support - Unable to register keys or sign a file while behind a proxy server
- hadoop组件书籍列表
- Android沉浸式——更改状态栏背景色
- 记(java数据结构与算法之顺序表与链表深入分析)
- pip memoryerror & oserror
- Android 动画之AnimatorSet
- unable to dequeue a cell with identifier xxx - must register a nib or a class fo
- android studio 手动更新gradle的方法
- iOS自定义相机实现拍照和连拍
- ubuntu搭建记录
- sum在matlab中的用法
- 使用Spring Session做分布式会话管理
- 跟QQ类似的本地相册多选功能,并在列表中提示已选图片数量
- 使用Android Studio阅读整个Android源码
- linux 内核配置机制(make menuconfig、Kconfig、makefile)讲解