Skip to content

Instantly share code, notes, and snippets.

View zac's full-sized avatar

Zac White zac

View GitHub Profile
@interface UIView (QuickLookUtilities)
- (id)debugQuickLookObject;
@end
@implementation UIView (QuickLookUtilities)
- (id)debugQuickLookObject
{
UIGraphicsBeginImageContext(self.frame.size);
[self drawViewHierarchyInRect:(CGRect){ .size = self.frame.size } afterScreenUpdates:YES];
UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();