Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCach

使用tableView的时候,可能会遇到崩溃在reloadData方法,控制台日志为:Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableViewRowData.m:619

导致崩溃的原因可能有两个:
1. 在heightforrow方法中返回的高度不正常,比如nan +inf -inf
2. 如果你的cell布局没有使用约束(代码约束、xib等),但是设置了estimatedRowHeight的值或是代理方法,也会造成崩溃。

猜你喜欢

转载自blog.csdn.net/jianghui12138/article/details/81268568