iOS 设置左上和左下为圆角方法

1.先定义一个 label 

2.//左上&左下为圆角

    UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:label.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerTopLeft cornerRadii:CGSizeMake(3, 3)];

    CAShapeLayer * maskLayer = [[CAShapeLayer alloc]init];

    maskLayer.frame = label.bounds;

    maskLayer.path = maskPath.CGPath;

    label.layer.mask = maskLayer;

posted @ 2016-11-22 09:56  tongyuling  阅读(2856)  评论(0编辑  收藏  举报