标签:
UILabel * label =[[UILabel alloc]initWithFrame:CGRectMake(100, 200, 100, 100)];
label.backgroundColor=[UIColor cyanColor];
[self.view addSubview:label];
//贝塞尔曲线
UIBezierPath * bezierPath2=[UIBezierPath bezierPathWithRoundedRect:label.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];
//根据贝塞尔曲线进行边缘描绘 只能进行边缘描绘 不能进行填充
CAShapeLayer *layer2 =[CAShapeLayer layer];
layer2.path=bezierPath2.CGPath;
layer2.frame=label.bounds;
layer2.lineWidth=1;
layer2.lineWidth=1;
label.layer.mask=layer2;
标签:
原文地址:http://www.cnblogs.com/wangbinbin/p/4796107.html