Ios UITableView moveRowAtIndexPath显示重复的单元格

Ios UITableView moveRowAtIndexPath显示重复的单元格,ios,uitableview,Ios,Uitableview,我有一个UITableView,其中我将一行从可见滚动区域外移动到UITableView的顶部。动画按预期工作,但最终显示的单元格与以前的索引0相同 除了硬编码索引外,代码类似于以下内容: [self.tableView beginUpdates]; [self.tableView moveRowAtIndexPath:[NSIndexPath indexPathForItem:16 inSection:0] toIndexPath:[NSIndexPath indexPathForItem:0

我有一个
UITableView
,其中我将一行从可见滚动区域外移动到
UITableView
的顶部。动画按预期工作,但最终显示的单元格与以前的索引0相同

除了硬编码索引外,代码类似于以下内容:

[self.tableView beginUpdates];
[self.tableView moveRowAtIndexPath:[NSIndexPath indexPathForItem:16 inSection:0] toIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]];
[self.tableView endUpdates];

我在iOS 8和iOS 7上都有这个问题。有人知道如何解决这个问题吗?

问题的原因是我的数据提供商在重新排序时出现了一个错误。我在tableview中移动了一个单元格,但数据数组没有反映出这种变化