title: How to render a SKNode to UIImage
body: <p>Just playing around with SpriteKit and am trying to figure out how to capture a 'grab' of an SKNode into a UIImage.</p>
  
  <p>With UIView (or a UIView subclass), I have used the <code>layer</code> property of the view to render into a graphics context.</p>
  
  <p>Eg.</p>
  
  <pre><code>#import &lt;QuartzCore/QuartzCore.h&gt;
  + (UIImage *)imageOfView:(UIView *)view {
      UIGraphicsBeginImageContextWithOptions(view.frame.size, YES, 0.0f);
      CGContextRef context = UIGraphicsGetCurrentContext();
      [view.layer renderInContext:context];
      UIImage *viewShot = UIGraphicsGetImageFromCurrentImageContext();
      UIGraphicsEndImageContext();
      return viewShot;
  }
  </code></pre>
  
  <p>SKNode is not a subclass of UIView and thus does not appear to be backed by a layer.</p>
  
  <p>Any ideas of how I might go about rendering a given SKNode to a UIImage?</p>