A layer that draws a color gradient over its background color, filling the shape of the layer (including rounded corners)
- iOS 3.0+
- macOS 10.6+
- tvOS 9.0+
- Core Animation
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.
Figure 1 shows the appearance of the gradient layer.