GradientPoint

struct GradientPoint

Represents a valid point for a CAGradientLayer’s startPoint or endPoint when beginning or ending a slide.

  • Represents a valid coordinate for either the x or the y of a GradientPoint.

    See more

    Declaration

    Swift

    enum Location: CGFloat
  • x

    The x coordinate of the GradientPoint

    Declaration

    Swift

    let x: Location
  • y

    The y coordinate of the GradientPoint

    Declaration

    Swift

    let y: Location
  • Initializes a GradientPoint given an x and a y. They both default to .default.

    Declaration

    Swift

    init(x: Location = .default, y: Location = .default)
  • A convenient way to convert a GradientPoint to a CGPoint.

    Declaration

    Swift

    var cgPoint: CGPoint