Is there any difference between those two ways of setting stroke color?
CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor)
[[UIColor redColor] setStroke]
Example
CGContextRef cr = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(cr, [UIColor redColor].CGColor);
[[UIColor redColor] setStroke];
UIBezierPath *bp = [UIBezierPath new];
[bp stroke];
UIGraphicsEndImageContext();
One is longer and pure C. The other is shorter and uses Objective-C. They have the same effect.