I was just wondering how does setStroke know to set the stroke for context when context isn’t mentioned at all in the setStroke method?
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 10);
[[UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1.0] setStroke];
Btw how often do you programmatically draw your own objects?
This is the implementation of
setStrokefor your color:It uses the same function to get the context that you’re using.