iPhone - using the current Quartz context from a thread
<p>I have a Quartz context declared in the main loop as</p>

<pre><code>UIGraphicsBeginImageContext(mySize);
ctx = UIGraphicsGetCurrentContext();
// bla bla bla
</code></pre>

<p>This context is changing, as the user is doing stuff on the screen.</p>

<p>At some point in the app I need a new thread to be fired and grab what the context has, saving to a UIImageView. </p>

<p>on the thread I have something like</p>

<pre><code>myImageView.image = UIGraphicsGetImageFromCurrentImageContext();
</code></pre>

<p>but this is giving me nil, as the thread is not able to know that the current context is.</p>

<p>How do I solve that?</p>

<p>thanks.</p>
