In the process of acquiring images asynchronously from a website and displaying them in an imageView in a tableView cell, I am implementing a process to reset the heightConstraint of the imageView to match the aspect ratio of the acquired image.
In this process, if the image is acquired after the cell is created, the height will not change even if the imageView's heightConstraint is reset.
So I ran tableView.reloadRows(at: [indexPath], with: .none) after retrieving the image and it displayed correctly.
Is this correct solution?
Is it correct to assume that if I change the autolayout constraint of an object in a cell after the cell is created, it will not be reflected in the screen display unless I reload the cell?
I would call reload as well. You get the same result if you scroll the cell out of view and scroll back, because it calls reload.
But you may likely use beginUpdate. Read here: