セルを垂直方向に拡大する動的テキストコンテンツがいくつかあり、高さを計算してテーブルセルに返すことでそれを行っています。テーブル セルのサイズは大きくなりますが、問題はセル内の UIView を大きくすることです。
次のコードを使用して高さを計算する同じ方法を使用して、セル内の UIView の高さを設定しましたが、フレームを設定した後でも UIView は成長しません。したがって、businessDescriptionTextView の下にはラベルがあり、コンテナーはセル内の UIView です。私はそれらの両方を設定していますが、getHeightBusinessDescription は正しい高さを返しますが、何らかの理由で再描画されません
cell.businessDescriptionTextView.text = self.dealLocation.company.description;
cell.businessDescriptionTextView.lineBreakMode = NSLineBreakByWordWrapping;
cell.businessDescriptionTextView.numberOfLines = 0;
[cell.businessDescriptionTextView sizeToFit];
CGRect frame = cell.container.layer.frame;
frame.size.height = [self getHeightBusinessDescription] + 50;
cell.container.layer.frame = frame;
cell.container cell.businessDescriptionTextView で setNeedsDisplay を試しましたが、まだ運がありません。テーブルのリロードも試しました
[self.tableView reloadRowsAtIndexPaths:array withRowAnimation:UITableViewRowAnimationNone];
フレームサイズを設定した直後に beginUpdates と endUpdates を使用しても、何も起こりませんでした。