iPhone - flattening a UIImageView and subviews to image = blank image
<p>I have a UIImageView with zillions of views. Some of these views have layer shadows or glow. This view is slightly bigger than the device screen. </p>

<p>This view is basically a big transparent view that contains many objects (images, buttons, etc.) </p>

<p>Now I want to flatten everything on that view to a UIImage. Then, I do:</p>

<pre><code>UIGraphicsBeginImageContext( [viewWithZillionsOfObjects bounds].size );
[[viewWithZillionsOfObjects layer] renderInContext:UIGraphicsGetCurrentContext()];
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
</code></pre>

<p>result is equal to a totally transparent image, but has the correct size.</p>

<p>am I missing something?</p>

<p>thanks</p>
