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.
- (UIImage *)debugQuickLookObject
{
UIGraphicsBeginImageContextWithOptions(self.view.layer.bounds.size, NO, 0);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
@dwsolberg
Copy link
Author

Add this in a category for a UIViewController to show the view controller's view in the Xcode debugger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment