Storyboard:
- Add new cell to table view
- Add a new image view to the cell
- It is not necessary to set a placeholder image for the image.
- Make cell restrictions describe its height explicitly
Do not forget to leave the cell height set to the default value.
Code:
Make the table view in cells with size values:
var tableview: UITableView { didSet { tableView.rowHeight = UITableViewAutomaticDimension tableView.estimatedRowHeight = 44 } }
At runtime, start downloading the image asynchronously as soon as possible.
When downloading, load the image into image view mode and do:
tableView.beginUpdates() tableView.endUpdates()
source share