SwiftUI React Nativev6.3.3
  • Values
  • Runtime

Getting started

  • Introduction
  • Installation
  • Quick start

Concepts

  • Reading the reference
  • Composing modifiers
  • Values
  • State and data flow

About

  • What it is
  • Why SwiftUI
  • History

Under the hood

  • How it renders
  • How it's generated
  • Principles
ValuesDrawing and shapes

AnyGradient

A color gradient.

StructureiOS 16.0+macOS 13.0+tvOS 16.0+watchOS 9.0+AnyGradient in SwiftUI

Declaration#

React
type AnyGradient = Gradient;
Swift
@frozen struct AnyGradient

Overview#

When used as a ShapeStyle, this type draws a linear gradient with start-point [0.5, 0] and end-point [0.5, 1].

From Apple’s SwiftUI documentation. Code samples there are Swift.

See also#

More in Drawing and shapes.

  • AngleA geometric angle whose value you access in either radians or degrees.
  • AngularGradientAn angular gradient.
  • BlendModeModes for compositing a view with overlapping content.
  • ButtonBorderShapeA shape used to draw a button's border.
  • ColorMatrixA matrix to use in an RGBA color transformation.
  • ConcentricRectangleAnimatableDataThe type defining the data to animate.
  • ContainerRelativeShapeA shape that is replaced by an inset version of the current container shape. If no container shape was defined, is replaced by a rectangle.
  • ContentShapeKindsA kind for the content shape of a view.
  • CoordinateSpaceProtocolA frame of reference within the layout system.
  • DefaultGlassEffectShapeThe default shape applied by glass effects, a capsule.
  • EllipticalGradientA radial gradient that draws an ellipse.
  • GlobalCoordinateSpaceThe global coordinate space at the root of the view hierarchy.

On this page

0%
  • Declaration
  • Overview
  • See also
Report an issue