user11248377
user11248377

Reputation:

How can I space out the borders from the image?

How can I make the borders to be a little bit more away from the image and not be directly attached to it like you can see at the screenshot enter image description here

Upvotes: 0

Views: 240

Answers (3)

Axort
Axort

Reputation: 2024

I don't know if I understand the question correctly but you might be looking for something like:

imageView.contentMode = .scaleAspectFit

Upvotes: 0

Santosh
Santosh

Reputation: 613

Try this

imageView.layer.cornerRadius = 10
imageView.layer.masksToBounds = true

Upvotes: 0

Federica Benacquista
Federica Benacquista

Reputation: 843

In order to have rounded corners you have to set

imageView.layer.cornerRadius = 9 //Or any other number

In order to make the borders further from the borders just change your constraints' values.

Upvotes: 1

Related Questions