There is only one UIImageView
in UITableViewCell
, and the layout is exactly the same as contentView
. I will show a set of images that look like a long picture.
My current practice is to download all the pictures in order, get the picture width and height, then get the actual height of UIImageView
according to the screen width, and finally set heightForRow
. This can work, but it is time consuming.
My question is, must I download the image before I can layout it? Is there a better way?
Update:
The ideal effect, without calculating the height, directly adapts to the cell height. Like label