iOS10-加载tableView闪退

2019-02-13  本文已影响1人  不明Xia落

划重点:iOS10系统绝对是我遇见出问题最多的系统!!!
代码中创建一个tableView的时候写了

self.tableView.estimatedSectionHeaderHeight = CGFLOAT_MIN;
self.tableView.estimatedSectionFooterHeight = CGFLOAT_MIN;

然后在tableView的代理方法中继续写了

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return CGFLOAT_MIN;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    return CGFLOAT_MIN;
}

iOS10系统的手机上,在进入这个tableView所在控制器的时候,会出现闪退(其他机型正常)。log打印:

Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:]

解决: 注释掉了

//    self.tableView.estimatedSectionHeaderHeight = CGFLOAT_MIN;
//    self.tableView.estimatedSectionFooterHeight = CGFLOAT_MIN;

这两行代码,然后闪退消失。

上一篇下一篇

猜你喜欢

热点阅读