Referring to the following image:
. . . . notice how it does not end in a proper point.
I use the following drawing code:
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 2.0);
CGContextSetStrokeColorWithColor(context, [UIColor whiteColor].CGColor);
CGContextMoveToPoint(context, self.width - 20, (self.height / 2) - 5);
CGContextAddLineToPoint(context, self.width - 12, self.height / 2);
CGContextStrokePath(context);
CGContextMoveToPoint(context, self.width - 20, (self.height / 2) + 5);
CGContextAddLineToPoint(context, self.width - 12, self.height / 2);
CGContextStrokePath(context);
Is there an easy way to say that a line should end in a point? I know that I could fix this by modifying the coordinates slightly, but I'm curious to learn more.