failed to obtain a cell from its dataSource 解决方案

来源:互联网 发布:mac itunes铃声 编辑:程序博客网 时间:2024/04/30 06:17

    使用iOS的tableView时,如果创建的是reuse cell,即在使用了类似如下的方法:

BPTimeLineCell *cell = [tableView dequeueReusableCellWithIdentifier:kTimeLineTableViewCellId];

    则需要在viewDidLoad中注册一个reUseCell:

[self.tableView registerClass:[BPTimeLineCell class] forCellReuseIdentifier:kTimeLineTableViewCellId];

    就能解决这样的错误啦:    
failed to obtain a cell from its dataSource (<_UIFilteredDataSource: 0x7b8b6570>)'

0 0