There comes a time in many iOS developers’s careers that they will need to save a reference to a color itself. Maybe it is just to change the background color of a view, maybe it is for custom drawing, or any number of other reasons.
This is where UIColor comes in. UIColor is particularly optimized to work on iOS devices, so while there are older similar classes like CGColor or CIColor, you should probably use UIColor, unless you are working on some app that needs to translate between different colorspaces.
[Read more…]