How to set profile Border opacity ?
How to set transparent for having opacity of border color with .white of 50% opacity.
profileView.layer.borderWidth = 3.0
profileView.layer.borderColor = UIColor.white.cgColor
How to set profile Border opacity ?
How to set transparent for having opacity of border color with .white of 50% opacity.
profileView.layer.borderWidth = 3.0
profileView.layer.borderColor = UIColor.white.cgColor
2
Answers
Use
withAlphaComponent
:or:
Obviously you can choose whatever alpha value you want in the range 0.0 to 1.0.
Or in this case you can use:
for alternative you can add UIView behind and set it as border of you ImageView, it’s easier to set the oppacity