ios - SizeToFit on UIImageView not working
问题 I have a UIImageView which loads in images from the documents directory on the ios file system . The problem is that when I call [imageView sizeToFit]; It does not work. I think it is because the image hasn't loaded fully at that point and so the sizeToFit part is called before it has the image width & height. Could someone point me in the direction of a fix please. Here is my code: imageView.contentMode = UIViewContentModeScaleAspectFit; imageView.image = [UIImage imageWithContentsOfFile: