The apple documentation states that Quartz2D is generally thread safe . However, when accessing the image context during NSOperation, I get crashes (EXC_BAD_ACCESS).
This is my current setup:
UIGraphicsBeginImageContext(imageSize);
CGContextRef context = UIGraphicsGetCurrentContext();
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
I suspect that the crashes are related to the current context, as the UIGraphicsGetCurrentContext document states that it needs to be called from the main thread . It's right? Are there other ways to get the image context?
source
share