Recently I encountered some code where trying to get the CIColor property of a UIColor fails. The UIColor was initialized as a simple [UIColor blackColor] and trying to get the
The doc says
Initializes a Core Image color object using an AppKit color object.
So you need create CIColor from NSColor class
CIColor *aCIColor = [[CIColor alloc] initWithColor:[NSColor blackColor]];
The diff between UIColor and CIColor in that UIColor from UIKit framework and using in iOS. From Doc Available in iOS 2.0 and later
A UIColor object represents color and sometimes opacity (alpha value). You can use UIColor objects to store color data, and during drawing you can use them to set the current fill and stroke colors
CIColor from CoreImage framework and using in Mac OSX Available in OS X v10.4 and later
The CIColor class contains color values and the color space for which the color values are valid. You use CIColor objects in conjunction with other Core Image classes, such as CIFilter, CIContext,and CIImage, to take advantage of the built-in Core Image filters when processing images.