Let's say I have an UIImageView
which is significantly smaller than the image it's showing. I set contentMode
to UIViewContentModeScaleAspectFill
to make it look like you're seeing only a specific part of the image. It automatically shows the center of the image.
I don't want to use the other contentMode
s like top, bottom, etc because in my app you can drag the imageView and as you move it, it shows the parts of the image that are under the imageView. In other words the imageView is like a window to the image itself.
How can I change which part of the image the imageView is showing?
Thanks!