Draw two parallel line using CAShape Layer
问题 I am drawing single line by CAShapeLayer *lineShape = nil; CGMutablePathRef linePath = nil; linePath = CGPathCreateMutable(); lineShape = [CAShapeLayer layer]; lineShape.lineWidth = 1.0f; lineShape.lineCap = kCALineJoinMiter; lineShape.strokeColor = [[UIColor redColor] CGColor]; CGPathMoveToPoint(linePath, NULL, x, y); CGPathAddLineToPoint(linePath, NULL, toX, toY); lineShape.path = linePath; CGPathRelease(linePath); [myView.layer addSublayer:lineShape]; i want to draw a parallel line to this