NSIndexPath* updatedPath = [NSIndexPath indexPathForRow: 0 inSection: 0];
NSIndexPath* updatedPath2 = [NSIndexPath indexPathForRow: 1 inSection: 0];
NSArray* updatedPaths = [NSArray arrayWithObjects:updatedPath, updatedPath2, nil];
[self.mySexyTableView reloadRowsAtIndexPaths:updatedPaths withRowAnimation:UITableViewRowAnimationTop];
上記のコードは機能し、アニメーション化されます。問題は、大量のデータがあり、行インデックスをハードコーディングしたくないことです。テーブルセクションにセクションが 1 つしかないため、セクションを 0 にすることができます。NSIndexPath オブジェクトの NSArray を動的に生成するにはどうすればよいですか?
または、テーブル ビューをアニメーション化する簡単な方法はありますか。ユーザーがテーブル ビューの上部にあるタブをクリックすると、テーブル ビューのすべての行が変更されます。