Is there some way I can do something like:
@implementation MyView
- (void)drawRect:(CGRect)rect
{
// Get the thing I'm supposed to draw (CGImageRef, pattern, etc.) and draw it
// i.e. not real code
CGContextDrawWhatever(self.objectThatHoldsDrawing.drawing);
}
Have a look at
CGPathRef,CGLayer(or maybe even justCALayer, but that’s mostly equivalent to adrawRect:method) and rendering (e.g. buffering) to image context and just renderind the image.