Class

CAGradientLayer

A layer that draws a color gradient over its background color, filling the shape of the layer (including rounded corners)

Declaration

@interface CAGradientLayer : CALayer

Overview

You use a gradient layer to create a color gradient containing an arbitrary number of colors. By default, the colors are spread uniformly across the layer, but you can optionally specify locations for control over the color positions through the gradient.

Topics

Gradient Style Properties

colors

An array of CGColorRef objects defining the color of each gradient stop. Animatable.

locations

An optional array of NSNumber objects defining the location of each gradient stop. Animatable.

endPoint

The end point of the gradient when drawn in the layer’s coordinate space. Animatable.

startPoint

The start point of the gradient when drawn in the layer’s coordinate space. Animatable.

type

Style of gradient drawn by the layer.

Constants

Gradient Types

The style of gradient drawn by the layer.

Relationships

Inherits From

See Also

Text, Shapes, and Gradients

CATextLayer

A layer that provides simple text layout and rendering of plain or attributed strings.

CAShapeLayer

A layer that draws a cubic Bezier spline in its coordinate space.