I have a view I make border with this run time attributes:
The problem is layer.borderColor
when I set borderColor my border is gone but when I don't set border Color I have a black border which I don't want
any ideas?
I have a view I make border with this run time attributes:
The problem is layer.borderColor
when I set borderColor my border is gone but when I don't set border Color I have a black border which I don't want
any ideas?
You are facing this issue because
layer.borderColor
wantCGColor
and fromUser defined runtime attributes
you can only setUIColor
notCGColor
, when you don't set the color it will take defaultborderColor
and i.eblack
color. To set borderColor you need to set it programmatically like this.Swift 3
Swift 2.3 or lower