Skip to content

Instantly share code, notes, and snippets.

View iltercengiz's full-sized avatar

Ilter Cengiz iltercengiz

View GitHub Profile
iltercengiz / gist:eb0dabe34463e3509286
Last active August 29, 2015 14:08
Generate 1x1 sized UIImage from UIColor
View gist:eb0dabe34463e3509286
+ (UIImage *)imageFromColor:(UIColor *)color {
UIImage *image = ({
CGRect rect = CGRectMake(0.0, 0.0, 1.0, 1.0);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, color.CGColor);
CGContextFillRect(context, rect);
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
iltercengiz / gist:9619712
Last active August 29, 2015 13:57
View gist:9619712
### Keybase proof
I hereby claim:
* I am iltercengiz on github.
* I am iltercengiz ( on keybase.
* I have a public key whose fingerprint is 6408 B427 DFBB 67BC 40EA 89A8 131F 8EC7 BB43 223B
To claim this, I am signing this object: