重新加载节时UITableView上的图形故障

时间:2016-02-26 23:26:01

标签: ios uitableview

基本上寻找任何可能经历类似事情的人的线索/提示。当我执行更新UITableView的一部分时,会出现图形故障/闪烁。您可以在下面的图片中看到这一点。

Glitch

我的刷新代码如下所示:

NSInteger sectionIndex = [self getSectionListIndexForID:sectionName];
[UIView setAnimationsEnabled:NO];
[self.tableView beginUpdates];
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationNone];
[self.tableView endUpdates];
[UIView setAnimationsEnabled:YES];

我的表数据,状态,高度等由字典支持,我查询如何显示部分和单元格。我基本上更新了switch事件上的字典并调用上面的代码。

修改

如果我删除了setAnimationsEnabled调用,这就是它的样子。

enter image description here

修改

更多线索。 "框架"因为它的layoutSubviews在切换动画期间被调用,看起来像一帧(导航的大小)的偏移64像素。慢慢地追捕......

修改

在调用toggleSendAction和performWithoutAnimation之间的某处,单元格的帧偏移了64个像素。

enter image description here

0 个答案:

没有答案