Apples documentation states that in general Quartz2D is thread-safe. However when drawing to an image context during a NSOperation I'm experiencing crashes (EXC_BAD_ACCESS).
This is my current setup:
UIGraphicsBeginImageContext(imageSize);
CGContextRef context = UIGraphicsGetCurrentContext();
// drawing code
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
I suspect the crashes are related to the current context as the UIGraphicsGetCurrentContext docu states that it needs to be called from the main thread. Is this correct? Are there any other ways to get the image context?