CGContextRef currentContext = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(currentContext, hh2DarkGray.CGColor);
CGFloat lengths[] = {0, 8};
CGContextSetLineCap(currentContext, kCGLineCapRound);
CGContextSetLineWidth(currentContext, 1);
CGContextSetLineDash(currentContext, 0.0f, lengths, 2);
CGContextBeginPath(currentContext);
CGContextMoveToPoint(currentContext, x1, y1);
CGContextAddLineToPoint(currentContext, x2, y2);
CGContextClosePath(currentContext);
CGContextDrawPath(currentContext, kCGPathStroke);
What am I doing wrong in the above code that makes it so the dots are not evenly spaced? It looks like this.
. .. .. .. .. .. .. .. .. .. . when I need it to look like this . . . . . . . . . . . . . . .
I am completely lost and all other posts I can find don't point out this kind of issue. Please help?