美文网首页
崩溃 Assertion failure in -[UISect

崩溃 Assertion failure in -[UISect

作者: coco_CC | 来源:发表于2018-11-12 17:33 被阅读13次

今天遇到一个特纠结的问题,在ios12.1上运行没问题,但是在10.3.3上运行就会崩溃

经过谷歌搜索解决问题如下:

在崩溃的tableview上修改,不管是cell高还是分组的高度,预算高度不能小于1(如:0.1),否则会出现报错,应该是内部bug导致,ios12.1及其他版本都没有问题。


大家又遇到这个问题可以按以下步骤解决

  • 1 .注释掉下面代码, 使用代理实现
        tableView.sectionFooterHeight = 0.1;
        tableView.sectionHeaderHeight = 0.1;
        tableView.estimatedSectionHeaderHeight = 0.1;
        tableView.estimatedSectionFooterHeight = 0.1;
  • 2 . 或者把0.1 改成大于1的任意数都可以, 1.1 , 1.5
  • 3 . 或者把0.1 改成0

相关文章

网友评论

      本文标题:崩溃 Assertion failure in -[UISect

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