热门搜索 :
考研考公
您的当前位置:首页正文

UILabel设置圆角无效是不是少了这个?

来源:东饰资讯网

当直接设置

label.layer.cornerRadius = 2.f;

是没有圆角效果的。

同时需要设置

label.clipsToBounds = YES;

或者

label.layer.masksToBounds = YES;
Top