Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dwsolberg/c93b659a20e840c39f9d to your computer and use it in GitHub Desktop.
Save dwsolberg/c93b659a20e840c39f9d to your computer and use it in GitHub Desktop.

Revisions

  1. dwsolberg created this gist May 14, 2014.
    8 changes: 8 additions & 0 deletions Quick Look object for a view controller
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    - (UIImage *)debugQuickLookObject
    {
    UIGraphicsBeginImageContextWithOptions(self.view.layer.bounds.size, NO, 0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
    }