Drawing custom graphics on the iPhone: CALayer vs. CGContext
- by Henry Cooke
Hi all,
I have an application in which I'm doing some custom drawing, a bunch of lines on a gradient background, like so (ignore the text, they're just UILabels):
At the moment, that's all done by starting a new CGContext, drawing stuff into it with CGContextDrawLinearGradient and CGContextStrokePath, then finally saving the resulting image with…