Skip to content

Instantly share code, notes, and snippets.

@ulrikdamm
Created May 26, 2014 11:17
Show Gist options
  • Save ulrikdamm/a9edb3516db7e9a13829 to your computer and use it in GitHub Desktop.
Save ulrikdamm/a9edb3516db7e9a13829 to your computer and use it in GitHub Desktop.
Xcide quicklook for UIColor
@interface UIColor (WBDebugExtensions)
@end
@implementation UIColor (DebugExtensions)
- (id)debugQuickLookObject {
UIGraphicsBeginImageContext(CGSizeMake(128, 128));
[self setFill];
[[UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 128, 128)] fill];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment