One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

AngularGradient

struct · iOS 13.0+ · SDK 27.1

@frozen nonisolated struct AngularGradient

An angular gradient. An angular gradient is also known as a "conic" gradient. This gradient applies the color function as the angle changes, relative to a center point and defined start and end angles. If `endAngle - startAngle > 2π`, the gradient only draws the last complete turn. If `endAngle - startAngle < 2π`, the gradient fills the missing area with the colors defined by gradient locations one and zero, transitioning between the two halfway across the missing area. The gradient maps the unit space center point into the bounding rectangle of each shape filled with the gradient. When using an angular gradient as a shape style, you can also use ``ShapeStyle/angularGradient(_:center:startAngle:endAngle:)``, ``ShapeStyle/conicGradient(_:center:angle:)``, or similar methods.

Members (6)

init · iOS 13.0+

init

TypeScript
static initStopsCenterStartAngleEndAngle(stops: Array<Gradient_Stop>, center: UnitPoint, startAngle: Angle, endAngle: Angle): AngularGradient
Swift declaration
@export(implementation) nonisolated init(stops: [Gradient.Stop], center: UnitPoint, startAngle: Angle, endAngle: Angle)

Creates an angular gradient from a collection of color stops.

init · iOS 13.0+

init

TypeScript
static initStopsCenterAngle(stops: Array<Gradient_Stop>, center: UnitPoint, angle?: Angle): AngularGradient
Swift declaration
@export(implementation) nonisolated init(stops: [Gradient.Stop], center: UnitPoint, angle: Angle = .zero)

Creates a conic gradient from a collection of color stops that completes a full turn.

init · iOS 13.0+

init

TypeScript
static initColorsCenterStartAngleEndAngle(colors: Array<Color>, center: UnitPoint, startAngle: Angle, endAngle: Angle): AngularGradient
Swift declaration
@export(implementation) nonisolated init(colors: [Color], center: UnitPoint, startAngle: Angle, endAngle: Angle)

Creates an angular gradient from a collection of colors.

init · iOS 13.0+

init

TypeScript
static initColorsCenterAngle(colors: Array<Color>, center: UnitPoint, angle?: Angle): AngularGradient
Swift declaration
@export(implementation) nonisolated init(colors: [Color], center: UnitPoint, angle: Angle = .zero)

Creates a conic gradient from a collection of colors that completes a full turn.

init · iOS 13.0+

init

TypeScript
static initGradientCenterStartAngleEndAngle(gradient: Gradient, center: UnitPoint, startAngle?: Angle, endAngle?: Angle): AngularGradient
Swift declaration
nonisolated init(gradient: Gradient, center: UnitPoint, startAngle: Angle = .zero, endAngle: Angle = .zero)

Creates an angular gradient.

init · iOS 13.0+

init

TypeScript
static initGradientCenterAngle(gradient: Gradient, center: UnitPoint, angle?: Angle): AngularGradient
Swift declaration
nonisolated init(gradient: Gradient, center: UnitPoint, angle: Angle = .zero)

Creates a conic gradient that completes a full turn.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →