SFGradientColor

public struct SFGradientColor

Gradient Color

  • Color Space

    Declaration

    Swift

    let colorSpace: CGColorSpace
  • Colors

    Declaration

    Swift

    public var colors: [SFWColor]
  • Color Locations

    Declaration

    Swift

    public var colorLocations: [CGFloat]
  • Gradient Type

    Declaration

    Swift

    public var type: GradientType
  • Gradient Direction (ignores when GradientType == .radial)

    Declaration

    Swift

    public var direction: Direction
  • Initializes Gradient Color

    Declaration

    Swift

    public init(colors: [SFWColor], colorLocations: [CGFloat], type: GradientType, direction: Direction = .vertical)

    Parameters

    colors

    Colors

    colorLocations

    Color Locations

    type

    Gradient Type

    direction

    Gradient Direction (ignores when GradientType == .radial), default value .vertical

  • Gradient Type

    See more

    Declaration

    Swift

    public enum GradientType
  • Gradient Direction

    See more

    Declaration

    Swift

    public enum Direction
  • Gradient

    Declaration

    Swift

    public var gradient: CGGradient? { get }