title: Alternative for UIGetScreenImage()
body: <p>The screen shot image returned from the apple's private API <code>UIGetScreenImage()</code> is <strong>640x1136</strong> in retina display but other alternative code gives only 320x568. Is it possible to take screen shot in @2x mode?</p>
  
  <p><strong>This is the code I am using</strong></p>
  
  <pre><code>-(UIImage*)getScreenShot:(CALayer*)layer 
  {
          UIGraphicsBeginImageContextWithOptions(layer.frame.size, NO, 0.0);
          [layer renderInContext:UIGraphicsGetCurrentContext()];
          UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
          UIGraphicsEndImageContext();
          return image;
  }
  
     [self getScreenShot:self.window.layer];
  </code></pre>