0

ダウンロード可能なアイテムの UITableView があり、ダウンロード アイテム情報に別の UITableView を使用しました。すべての UITableViewCell の UiTableView をリロードするにはどうすればよいですか?

使ってみ[downloadList reloadData];ましたが、大きなテーブルしか更新されません。

編集:私は次のようなことをしようとしています:jsfiddle.net/WrNFU。詳細を適切に揃えたいのですが、問題は、タイトルが長すぎる可能性があり、タイトルが何行になるかわからないことです。タイトル行の高さを調整できる heightForRowAtIndexPath 関数のために、2 番目のテーブルを使用しました。

答え:

ここで見つけたコードを使用: iPad: UITableView 内のすべてのセルを反復処理しますか?

    for (int section = 0; section < [downloadList numberOfSections]; section++) {
        for (int row = 0; row < [downloadList numberOfRowsInSection:section]; row++) {
            NSIndexPath* cellPath = [NSIndexPath indexPathForRow:row inSection:section];
            UITableViewCell* cell = [downloadList cellForRowAtIndexPath:cellPath];

            UITableView *tempTableView = (UITableView *)[cell viewWithTag:110];
            [tempTableView reloadData];
        }
    }
4

1 に答える 1