// 画一个圆角矩形
CGContextRef contextRef = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(contextRef, 1.0f, 1.0f, 1.0f, 1);
CGContextSetLineWidth(contextRef, 20.0f);
CGContextAddRect(contextRef, CGRectMake(50.0f, 50.0f, 100.0f, 100.0f));
CGContextStrokePath(contextRef);
CGLineJoin lineJoin = kCGLineJoinRound;
CGContextSetLineJoin(contextRef, lineJoin);
CGContextStrokePath(contextRef);
转载于:https://www.cnblogs.com/pengyingh/articles/2388407.html