UIImageView in UIView and do not display parts of the image outside

How can I solve the problem that I mentioned in the title? So, I have a UIImageView, and it has a UIImage in it. My UIImageView is in a view. When I set the beginning of the image to (-120, -30), then I do not want to see the beginning of my image. Is it possible? It can be done? How?

+3
source share
1 answer

Set the property clipsToBoundsin the image view to YES.

+7
source

Source: https://habr.com/ru/post/1733215/


All Articles