iphone Dev: Invalid Context CGContextDrawLayerInRect
<p>I have a uiscrollview within three subUIViews 1, 2, 3.  I load content for subUIView1, 2,3 dynamically. Here are steps</p>

<ol>
<li>I create scrollview with these 3 
subUIview and with a default size
for each subUIView</li>
<li><p>I create an operation for each subUIView, let us say Operation 1,2,3. add to operation queue</p></li>
<li><p>every Operation (operation 1)  calculate  the content  that will be later draw in related subUIView (subview 1). after calculate completed, create CGLayer and attach it with UISubview1. reset all UIsubviews frame and bound and layout scrollview subviews and setNeedDisplay for related subUIview1. then move to next operation</p></li>
<li><p>in SubUIView drawRect method, i call    CGLayerDrawInRect. </p></li>
</ol>

<p>then occasionly i
    get this error Invalid Context.
    sometimes, it work fine, no error sometime it happened</p>

<pre><code>Any idea about this error will be welcome.
</code></pre>

<p>.</p>
