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 line . Any idea or calculation?
or is there any code for getting touch point of this particular line . actually i can get touch point when i touch between two lines and from CGPathContainsPoint method i can get touch point between two lines , hence i want to create two parallel lines here.