title: Remove status bar strip from screen capture
body: <p>When I take a screen shot programmatically with the code below it leaves a white strip where the status bar is supposed to be. I know you cannot capture the status bar but I just want the white blank strip cropped out.</p>
  
  <pre><code>- (UIImage*)captureView:(UIView *)view
  {
  CALayer *layer = [[UIApplication sharedApplication] keyWindow].layer;
  CGFloat scale = [UIScreen mainScreen].scale;
  UIGraphicsBeginImageContextWithOptions(layer.frame.size, NO, scale);
  
  [layer renderInContext:UIGraphicsGetCurrentContext()];
  UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
  UIGraphicsEndImageContext();
  return img;
  
  }
  </code></pre>