I'm trying to fit an image in uiimageview, images are uploaded and loaded dynamically, and only one resolution is available for ios and android applications.
So, I need images to maintain aspect ratio and scale to width, I set the UIImageView content mode to UIViewContentModeScaleAspectFill , but it centers the image, so it exits the screen both from above and below, the images will be designed so that the bottom is not needed.
How can I align the image in the upper left corner?
And can scaling UIImageView for me too? or how can i do this?
Thanks in advance.
EDIT:
I tried setcliptobounds and it reduces the size of the image to the image, this is not my problem.
UIViewContentModeTopLeft works well, but now I cannot apply UIViewContentModeScaleAspectFill , or can I apply both?
source share