开发者

make UILabel roundrect shape

How to mak开发者_如何学编程e UIlabel roundRect shape ? By changing background color of UILabel it looks like a rectangle in shape I want to make it look like a roundrect in shape.

Thanks.


first import file

#import <QuartzCore/QuartzCore.h>

and than set the property of UIlabel as

yourLabel.layer.cornerRadius = kCornerRadius;


If you mean to give the label a rounded-rectangle border, you can do that by setting the cornerRadius, borderWidth, and borderColor properties of the label's layer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜