How to create a blank transparent png in Objective-C?
You can open an image context, and then harvest its content immediately, without drawing anything into it. This should produce a blank 36x36
UIImage
:
UIGraphicsBeginImageContextWithOptions(CGSizeMake(36, 36), NO, 0.0);
UIImage *blank = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();