美文网首页
iOS -[UITableView dequeueReusabl

iOS -[UITableView dequeueReusabl

作者: 天下只有一个 | 来源:发表于2017-10-09 13:36 被阅读36次

Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:]

出现这个报错,注册cell应该放在最前面。

注册的cell的方法需要放在,self.tableView.separatorStyle  = UITableViewCellSeparatorStyleNone;前面

[self.tableView registerClass:[SelectionHotCell class] forCellReuseIdentifier:@"SelectionHotCell"];

self.tableView.separatorStyle  = UITableViewCellSeparatorStyleNone;

相关文章

网友评论

      本文标题:iOS -[UITableView dequeueReusabl

      本文链接:https://www.haomeiwen.com/subject/akguyxtx.html