unable to dequeue a cell with identifier xxx - must register a nib or a class fo
2016-11-09 16:23
399 查看
问题如下:
最近自定义Cell 出现不少问题,一般都是由于没有进行注册下面是我遇到的,写的基本上同样的自定义Cell这个运行就报下面的错误。
解决方法:
方法一:将方法
dequeueReusableCellWithIdentifier: forIndexPath:
替换成方法
dequeueReusableCellWithIdentifier:
方法二:
在方法
dequeueReusableCellWithIdentifier: forIndexPath:
的前面添加方法
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:reuseIdentifier];
如果是自定义cell的话,若类名为
xxxxcill,那么添加的方法将改为
[self.tableView registerClass:[xxxxcell class] forCellReuseIdentifier:reuseIdentifier];
相关文章推荐
- 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...问题
- TableView unable to dequeue a cell with identifier Cell - must register a class or Nib
- UITableView 的一个常见错误'unable to dequeue a cell with identifier Cell - must register a nib or a class f
- unable to dequeue a cell with identifier Identify - must register a nib or a class for the identifie
- unable to dequeue a cell with identifier cell - must register a nib or a class for the identifier or
- UITableViewCell unable to dequeue a cell with identifier Cell - must register a nib or a class for t
- UITableViewCell unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell
- 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'的解决办法
- 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'
- 哈02—kill error_______unable to dequeue a cell with identifier Cell
- unable to dequeue a cell with identifier shopCell
- Xcode error: unable to dequeue a cell with identifier cell
- UITableView使用注意事项(unable to dequeue a cell with identifier)
- Xcode unable to dequeue a cell with identifier
- Fatal Error: Unable to find package java.lang in classpath or bootclasspath
- Unable to find any test data conversion strategy for parameter with name ArrayList<XXX>
- fatal error: malformed or corrupted AST file: 'Unable to load module "/Users/xxx/Library/Developer/X
- HTTP Status 500 - Unable to compile class for JSP:Duplicate local variable xxx