UIColor
class UIColor : NSObject, NSSecureCoding, NSCopying
-
Return the red component of the UIColor
Declaration
Swift
internal var r: CGFloat { get }
-
Return the green component of the UIColor
Declaration
Swift
internal var g: CGFloat { get }
-
Return the blue component of the UIColor
Declaration
Swift
internal var b: CGFloat { get }
-
Return the alpha component of the UIColor
Declaration
Swift
internal var a: CGFloat { get }
-
Interpolate a fraction between the current color and a second one
- to: The second color.
- fraction: The percent of current color and second one.
Declaration
Swift
internal func interpolate(to: UIColor, fraction: CGFloat) -> UIColor?
-
Create a UIColor from hexadecimal value
- hex: The hexadecimal value.
let darkGrey = UIColor(hex: 0x757575)
Declaration
Swift
convenience public init(hex: Int, alpha: Int = 0xff)