话不多说,直接上代码
CAShapeLayer *circleLayer = [[CAShapeLayer alloc] init];
[circleLayer setFillColor:[UIColor clearColor].CGColor];
[circleLayer setStrokeColor:[UIColor redColor].CGColor];
[circleLayer setLineWidth:1.5f];
UIBezierPath *circleBezierPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(56, 63) radius:31 startAngle:0 endAngle:M_PI * 2 clockwise:YES];
circleLayer.path = circleBezierPath.CGPath;
[self.layer addSublayer:circleLayer];