iOS10-加载tableView闪退

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

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容