Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cornerRadius for UILabel using User Defined Runtime Attributes not working

I try to add cornerRadius to UILabel using User Defined Runtime Attributes But it is not working as expected, cornerRadius is not setting and I wonder where I made mistake. I attached screenshot of it,

enter image description here

Help me out in solving

like image 804
Forte Zhu Avatar asked Feb 10 '17 06:02

Forte Zhu


1 Answers

It is layer.cornerRadius not just cornerRadius also you need to set layer.masksToBounds to true.

enter image description here

like image 131
Nirav D Avatar answered Sep 28 '22 19:09

Nirav D