I want to generate a image of UIScrollView?
<p>In iPhone application I want to generate a image of <code>UIScrollView</code> whose content size is near about <code>600*41000</code>. If I use current graphic image context to capture the scroll view layer, then it only captures the visible part of the scroll view not the whole layer of that scroll view.</p>

<p>I am using the below code:</p>

<pre><code>{
    UIGraphicsBeginImageContext(CGSizeMake(600, 4100));
    [scrollView.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();



    UIImageView *img = [[UIImageView alloc]initWithFrame:CGRectMake(00, 100, 710, 4100)];
    img.image = viewImage;
    [anotherScrollView addSubview:img];
}
</code></pre>
