Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /Source
1、
*** Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit_Sim/UIKit-3600/UITableViewRowData.m:485
本人遇到此问题是因为为了适配 iOS11 增加的代码,也在其他 iOS 版本中添加而造成的,只要做下面处理即可:
if #available(iOS 11.0, *) {
//适配iOS11的代码
}
2、
*** Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableViewRowData.m:619
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'table view row height must not be negative - provided height for index path (<UIMutableIndexPath 0x7fc9a368f0b0> 2 indexes [0, 0]) is nan'
报错原因是 在tableview的heightForRow方法里返回的数据错误,返回的数据是nan型的,为什么是nan呢,猜测可能是数据越界,你可能得到到的是double类型,而heightforrow需要的是CGFloat类型
解决方法:
在height for row方法里 做出判断,如果height == nan 就设置默认高度
第二个问题本人并没有遇到,在找寻答案时发现有人遇到过上面问题就集中放一起。
Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /Source的更多相关文章
- Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:]
最近在项目中遇到了 Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] 这个 ...
- Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]
今天遇到了Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]这个错误,一直也没有百度,不料想却弄了一个 ...
- iOS Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.30.14/UITableView.m:7962
Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Cac ...
- iOS Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:]
Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-3 ...
- Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318/UITableView.m:10772
Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-3 ...
- ios AFNetworking 3.0 报错 : *** Assertion failure in -[AFHTTPRequestSerializer requestWithMethod:URLString:parameters:error:],
AFNetWorking[:] *** Assertion failure -- :::] *** Terminating app due to uncaught exception 'NSInter ...
- *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory
报错提示: *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndex ...
- 解决:CWnd::SetWindowText报Assertion failure
参考资料: http://www.cnblogs.com/tiancun/p/3756581.html http://www.tc5u.com/mfc/2120698.htm http://forum ...
- Assertion failure in -[UIView layoutSublayersOfLayer:]
Assertion failure in -[UIView layoutSublayersOfLayer:], /SourceCache/UIKit/UIKit-2935.137/UIView.m:8 ...
随机推荐
- Linux基本命令学习-文件基本操作1
关机重启 shutdown -h now #立即关机 shutdown -h 5 # 5秒后关机 #重启 shutdown -r now #立即重启 reboot halt #重启 文件相关 系统目录 ...
- MySQL高级篇 | 索引介绍
前言 性能下降SQL慢的原因 查询语句写的烂 索引失效 单值索引 复合索引 关联查询太多join(设计缺陷或不得已的需求) 服务器调优及各个参数设置(缓冲.线程数等) 索引是什么 MySQL官方对索引 ...
- 羽夏看Win系统内核——系统调用篇
写在前面 此系列是本人一个字一个字码出来的,包括示例和实验截图.由于系统内核的复杂性,故可能有错误或者不全面的地方,如有错误,欢迎批评指正,本教程将会长期更新. 如有好的建议,欢迎反馈.码字不易, ...
- [后端及服务器][WSL2(Ubuntu)+Docker]从零开始在WSL中安装Docker
目录 简介 WSL 安装 开启虚拟化(BIOS) 检查系统版本 安装WSL 老版本安装详情 简介 想花三篇文章写下从Windows(WSL)上开启Docker部署php/node/vue/html等项 ...
- c++学习笔记5(函数的缺省参数)
例: void func(int x1,int x2=2,int x3=3){} func (10)//等效于func (10,2,3) func (10,8)//等效于func (10,8,3) f ...
- PTA7-2 愿天下有情人都是失散多年的兄妹
呵呵.大家都知道五服以内不得通婚,即两个人最近的共同祖先如果在五代以内(即本人.父母.祖父母.曾祖父母.高祖父母)则不可通婚.本题就请你帮助一对有情人判断一下,他们究竟是否可以成婚? 输入格式: 输入 ...
- Django 小实例S1 简易学生选课管理系统 11 学生课程业务实现
Django 小实例S1 简易学生选课管理系统 第11节--学生课程业务实现 点击查看教程总目录 作者自我介绍:b站小UP主,时常直播编程+红警三,python1对1辅导老师. 课程模块中,学生需要拥 ...
- Java设计模式之(五)——代理模式
1.什么是代理模式 Provide a surrogate or placeholder for another object to control access to it. Proxy Patte ...
- [cf720D]Slalom
对于每一行,这些障碍将其划分为若干段,记第$i$行($y=i$时)从左到右第$j$段为$[l_{i,j},r_{i,j}]$ 显然一条路径恰好经过每一行中的一段,且两种方案不同当且仅当其中经过的一段不 ...
- [atARC077F]SS
(以下字符串下标从0开始,并定义$2s=s+s$) 考虑$f(S)$,即令$l=\max_{2i<|S|且S[0,i)=S[|S|-i,|S|)]}i$,则$f(S)=S+S[l,|S|-l)$ ...