I am trying to add some images to my UIImageView. Everything works fine if png is the same size as ImageView.
But when I insert a larger image, it is not discarded.
This is my code:
@IBOutlet weak var PictureView: UIImageView! func loadSomePicture() { var examplePicture = UIImage(named: "Block.png") PictureView.image = exampleProfilePicture PictureView.layer.cornerRadius = 50 PictureView.clipsToBounds = true
The Althoug property clipsToBounds is set to true, and the View mode is Scale to fill, the image remains in its original size.
Thank you for your help!
source share