- (void)drawRect:(CGRect)rect {
//线条颜色
UIColor *color = [UIColor redColor];
[color set];
//添加路径
UIBezierPath *path = [UIBezierPath bezierPath];
path.lineWidth = 3;
//线条拐角
path.lineCapStyle = kCGLineCapRound;
//终点处理
path.lineJoinStyle = kCGLineJoinRound;
[path moveToPoint:(CGPoint){ 50, 300}];
[path addCurveToPoint:(CGPoint){180, 300} controlPoint1:(CGPoint){ 100, 230} controlPoint2:(CGPoint){ 110, 320}];
//根据坐标点连线
[path stroke];
}