博客園地址:http://www.cnblogs.com/HMJ-29/p/7573921.html
1、
******* Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit_Sim/UIKit-3600/UITableViewRowData.m:485
本人遇到此問題是因?yàn)闉榱诉m配 iOS11 增加的代碼,也在其他 iOS 版本中添加而造成的,只要做下面處理即可:
if #available(iOS 11.0, *) {
//適配iOS11的代碼
}
2、
***** Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableViewRowData.m:619
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'table view row height must not be negative - provided height for index path (<UIMutableIndexPath 0x7fc9a368f0b0> 2 indexes [0, 0]) is nan'
報錯原因是 在tableview的heightForRow方法里返回的數(shù)據(jù)錯誤,返回的數(shù)據(jù)是nan型的,為什么是nan呢,猜測可能是數(shù)據(jù)越界,你可能得到到的是double類型,而heightforrow需要的是CGFloat類型
解決方法:
在height for row方法里 做出判斷,如果height == nan 就設(shè)置默認(rèn)高度
第二個問題本人并沒有遇到,在找尋答案時發(fā)現(xiàn)有人遇到過上面問題就集中放一起。