title: iPhone4 iOS take screenshot of the view without NavBar and TabBar?
body: <p>I got this code to be able to take a screenshot of the view.</p>
  
  <pre><code>UIGraphicsBeginImageContext(scrollView.bounds.size);
  [scrollView.layer renderInContext:UIGraphicsGetCurrentContext()];
  UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
  UIGraphicsEndImageContext();
  NSData * data = UIImagePNGRepresentation(image);
  </code></pre>
  
  <p>However, even if I set the context to be 320x480, parts of the scroll view are still not shown. The view that the scrollview manages can perfectly fit within the 320x480 frame, but parts of it are covered by the status bar, navBar and TabBar.</p>
  
  <p><strong>I would like to take full screen (320x480) screenshot of the view with the parts of the view, covered by status bar, TabBar and NavBar visible.</strong> Any pointers on how to do this?</p>
  
  <p>An extra question, which may be related: the resulting image is using x1 scale, and looks very blurry on the retina display, which scales takes a larger image and scales it down. This means I'll need to render the 640x960 screenshot to reproduce the original crisp quality. How would I go about doing that? </p>
  
  <p>Thank you!</p>