UIImageView in UIView and not to display image parts out of bounds

蓝咒 提交于 2019-12-23 18:52:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!