zoukankan      html  css  js  c++  java
  • Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:]

    最近在项目中遇到了

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

    这个崩溃报错,并且真机调试 卡在了 mj_reloadData 那里,是苹果那些人跟 mj教授过不去么,是可忍孰不可忍,投诉,投诉,投诉!

    在系统11上运行没问题, 系统10.3.3-iphone6-xcode9 报错.
    解决办法
    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

    有时候还会报错  section footer height must not be negative - provided height for section 0 is -0.000100

    你明明在代理方法里面 设置了 正的值,但是它就偏偏给你说 你设置的是负值。

    当iOS9或iOS8系统下使用func tableView(_ tableView: UITableView, estimatedHeightForFooterInSection section: Int) -> CGFloat,如果return 值小于1会产生崩溃,iOS11和12则不会。

    反正  这俩crash都是height在搞鬼,最初我们为了适应ios8、ios9. 给footer设置高度为0 系统不认,只好设置个0.00X 来。 但是随着新的版本的出现,这个0.00x要被废弃了。 而且我觉得 那个  tableView.estimatedSectionXXXHeight 也很鸡肋,基本用不到哦。

    有不同看法欢迎评论区评论   190917

  • 相关阅读:
    .Net Remoting使用总结
    MacOS入门
    第一部分_Mac技巧
    国内安装Homebrew
    MacOS工具
    org.springframework.beans.factory.UnsatisfiedDependencyException异常
    五天一体_企业权限管理(SSM整合)
    00_02_使用Parallels Desktop创建Windos7虚拟机
    00_01_使用Parallels Desktop创建WindosXP虚拟机
    OpenCV中几何形状识别与测量
  • 原文地址:https://www.cnblogs.com/isItOk/p/4749893.html
Copyright © 2011-2022 走看看