问题
How can I solve the problem I mentioned in the title? So I have an UIImageView and in it there is an UIImage. My UIImageView is in a View. When I set the origin of the imageview to (-120, -30) then I don't want to see the start of my imageview. Is this possible? Can this be done? How?
回答1:
Set the clipsToBounds
property on the image view to YES.
来源:https://stackoverflow.com/questions/2281939/uiimageview-in-uiview-and-not-to-display-image-parts-out-of-bounds