美文网首页
iOS10-加载tableView闪退

iOS10-加载tableView闪退

作者: 不明Xia落 | 来源:发表于2019-02-13 17:01 被阅读1次

划重点: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;

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

相关文章

网友评论

      本文标题:iOS10-加载tableView闪退

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