【问题标题】:UItableview animation crash occuring while insert and delete插入和删除时发生 UItableview 动画崩溃
【发布时间】:2013-10-16 09:03:26
【问题描述】:

由于uncaught exception NSInternalInconsistencyException而终止应用,

原因: Cell animation stop fraction must be greater than start fraction 使用时

[self.tableView insertRowsAtIndexPaths:indexPathsToInsert withRowAnimation:insertAnimation];
[self.tableView deleteRowsAtIndexPaths:indexPathsToDelete withRowAnimation:deleteAnimation];

【问题讨论】:

  • 尝试将动画设置为nil。动画会有问题。
  • 你可以看看这个帖子:stackoverflow.com/questions/11664766/…
  • 您是否使用任何页眉/页脚?
  • 是的,我正在使用页眉和页脚。

标签: iphone ios ipad uitableview


【解决方案1】:

它在 iOS7.x 上的 bug 解决方法是删除下面的委托,

tableView:viewForFooterInSection:
tableView:heightForFooterInSection:

并将它们替换为 viewDidLoad 中的以下代码行。

tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];

【讨论】:

  • 好吧,但这不适用于您需要部分而不是表格视图页脚的情况。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-01-09
  • 2012-03-11
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多