微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ios – 在UITableView中删除行时Tableview崩溃 – 样式:普通和部分页脚

我有一个由fetchedresultscontroller支持的tableview.当我删除一行导致tableview的底行向上滚动所以电视没有填满整个屏幕时,我得到了下面的崩溃.

以下是我发现的解决方法.

>如果我将tableview更改为分组而不是简单 – 错误就会消失.
>如果我删除分页脚 – 错误就会消失.这对我来说不是一个可行的解决方法.

The error occurs after “controllerWillChangeContent” and prior to the “controllerDidChangeContent” – the code here is just copy/pasted from Apple’s FRC protocol reference.

谁知道为什么会这样?由于它与Grouped tableview一起运行很好,它似乎很可能是一个Apple bug – 但我想在报告之前我先问这里.

Assertion failure in -[UIViewAnimation initWithView:indexPath:endRect:endAlpha:startFraction:endFraction:curve:animateFromCurrentPosition:shouldDeleteAfteranimation:editing:],/SourceCache/UIKit_Sim/UIKit-2903.23/UITableViewSupport.m:2661
2014-03-08 17:13:29.226 workBox[7527:70b] CoreData: error: SerIoUs application error. An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:. Cell animation stop fraction must be greater than start fraction with userInfo (null)

Sample program

解决方法

我已经在github上下载你的项目,在iPad Air上测试过.
我点击了一些元素,即使应用程序应该向上滚动,因为你有很多元素,没有任何问题/崩溃

我已经在xCode 7.3.2和iPad Air 9.2上进行了测试.模拟器

你能不能用它的设备说它崩溃了?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐