TableView は 3 つのセクションで構成され、それぞれが行の値の配列に追加されます。これらの配列は、各セルのアクセサリ ビューのボタンを介して相互に関連付けられます。したがって、ボタンが押されると、基になるデータソースが変更され、テーブルがリロードされ、数値と一致します。更新前と更新後の行の次のコードが使用されます:
int sentCount = [[self sendersList] count];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:0];
NSIndexPath *indexPathToMove = [NSIndexPath indexPathForRow:(sentCount - 1) inSection:2];
[tableView beginUpdates];
[tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPathToMove] withRowAnimation:UITableViewRowAnimationRight];
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationLeft];
[tableview endUpdates];
[tableview reloadData];
私が得ているのは、データソースからデータを取得した後に cellForRowAtIndexPath によって表示されるはずだったセルではなく、この新しいインデックスパスの元の行の複製です。
行が挿入されるセクションが適切な回数呼び出されていることをログに記録して確認しましたが、表示される値は元のセルの複製コピーです。