CAShapeLayer * line = [CAShapeLayer layer];
CGMutablePathRef path = CGPathCreateMutable();
line.fillColor = [UIColor clearColor].CGColor;
line.strokeColor = rgb(190, 190, 190).CGColor;
line.lineWidth = 10.0f;//长度
CGPathAddEllipseInRect(path, nil, CGRectMake(imageView.x, imageView.y, imageView.width, imageView.height));
line.path = path;
line.lineDashPhase = 1.0;
line.lineDashPattern = @[@1,@5];//@1:宽度 @5:间隔
[imageView.layer addSublayer:line];
Blowing Blowing@2x.png
网友评论