我希望基于 UIColor 动态创建一个1x1的 UIImage。
I suspect this can quickly be done with Quartz2d, and I'm poring over the documentation trying to get a grasp of the fundamentals. However, it looks like there are a lot of potential pitfalls: not identifying the numbers of bits and bytes per things correctly, not specifying the right flags, not releasing unused data, etc.
如何使用 Quartz 2d (或其他更简单的方法)安全地完成这项工作?