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.

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

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

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

result is equal to a totally transparent image, but has the correct size.

am I missing something?

thanks

Edit
Report