A user UITableViewCellincludes an image that is downloaded asynchronously from the Internet, and its size / aspectRatio is not known in advance, so there is no way to return the exact height of the cell to tableView:heightForRowAtIndexPath:.
I can return the estimated height in the delegate method, but I need to inform the tableView about the change in cell height when loading the image. How should I do it?
reloadData will be too heavy, considering every time the image is loaded, the entire tableView is updated.reloadRowsAtIndexPaths:withRowAnimation:also not good. Since the cell itself does not change, it is necessary to update its height.
source
share