Dynamic height with UITableViewAutomaticDimension

时间:2015-10-30 22:47:35

标签: ios objective-c uitableview

I have a problem. I'm trying to implement dynamic cell height in the annex, when I have nothing. Normally, in my cell I have one UIImageview and three UILabel. My task is to implement dynamic height of the text without changing the picture size. The picture comes from the server and scaled inside the cell with the mod Scale to fill. My Text does not change its height in the cell.

self.tableView.estimatedRowHeight = 415.0f;
self.tableView.rowHeight = UITableViewAutomaticDimension;

I always found numberOfLines = 0;

The problem is that the picture is stretched to the server, which should not be a text of its size does not change.

enter image description here enter image description here

1 个答案:

答案 0 :(得分:0)

问题是您没有对图像视图的大小设置任何限制。因此它采用图像的大小。