SIAJSAJ IJSAIJSAJA SIAJSAJ IJSAIJSAJA - 1 year ago 58
Swift Question

Swift how to show only part of image?

I have got an image 300px300px, but i only want to show 100x100 of it, just like here https://www.pinterest.com/pin/31103053652400980/ background photo is only showing part of it.How can i do that?

Answer Source

You can use UIImageView that has property Clip To Bounds on. After that you can change Content Mode of the `UIImageView' that suits you.

Example:

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download