I am downloading a rather big image and storing it in a UIImage
. I then add that UIImage
to a UIImageView
to display, but the UIImage
is just too large, and of thus, it only displays a portion of the image (the upper-left corner of it). I want it to display the entire UIImage, scaling the image down to fit the UIImageView.
I have looked at a lot of different answers, but I can't get any of them working. I have set the scale mode of the UIImageView
to both Aspect Fill, fit and you name it (also tried clip subviews) but nothing is working.
Here is the code:
UIImage *trackImg = [UIImage imageWithContentsOfFile:trackImagePath];
_backgroundImage.image = trackImg;
Code is simple, but all it does is download a UIImage, and set it as the image of a UIImageview. The UIImageView is configured in the interface-builder.
Thanks in advance.