项目在真机上测试一直没问题、今天在手机上运行一直报下面错误
*** Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3599.6/UITableViewRowData.m:465
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'section footer height must not be negative - provided height for section 0 is -0.010000'
查阅相关资料发现是下面代码导致的
_tableView.estimatedSectionFooterHeight = 0.01f;这行代码导致的
- (CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 0.01;//设置尾视图高度为0.01
}
希望遇见这个问题的你快速找到问题答案
提供tableViewSectionHeader、Footer高度为0的设置
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 0.01f;//CGFLOAT_MIN
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 0.01f;//CGFLOAT_MIN
}