Initializer

init(cgColor:)

Initializes and returns a color object using the specified Quartz color reference.

Declaration

init(cgColor: CGColor)

Parameters

cgColor

A reference to a Quartz color.

Return Value

An initialized color object. The color information represented by this object is in the native colorspace of the specified Quartz color.

See Also

Creating a UIColor Object from another Representation of Color

init(ciColor: CIColor)

Initializes and returns a color object that encapsulates a Core Image color.

func withAlphaComponent(CGFloat) -> UIColor

Creates and returns a color object that has the same color space and component values as the receiver, but has the specified alpha component.