I have an UIImageView
with UIViewContentModeCenter
, so Images that it holds are not getting scaled or deformed. But this way if the image is larger, it can be seen outside the ImageView's frame.
I don't want to crop the image (user can scale it, so the loss of data is not an option), but I need to make the part of it outside of ImageView
invisible or something
You need to set clipsToBounds property of the UIImageView to YES.
My solution was to put UIImageView inside UIScrollView and then manage size and position things inside scrollView.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With