ios关于layer的一些常用属性

UILabel * labb = 。。。

//set the border of labb

labb.layer.borderWidth = 1;

labb.layer.borderColor = [UIColor lightGrayColor].CGColor;

//创建圆角图片

fixLab.layer.masksToBounds = YES;

fixLab.layer.cornerRadius = fixLab.frame.size.height*0.1;

[self.view addSubview:labb];

原文地址:https://www.cnblogs.com/isItOk/p/4615408.html