GradientLayer

public class GradientLayer: CAGradientLayer

The GradientLayer class draws a color gradient over its background color, filling the shape of the layer (including rounded corners)

  • A boolean value that, when true, prevents the animation of a shape’s properties.

    This value can be set globally, after which changes to any shape’s properties will be immediate.

    Declaration

    Swift

    public static var disableActions = true
  • The value of the receiver’s current rotation state. This value is cumulative, and can represent values beyong +/- π

    Declaration

    Swift

    public dynamic var rotation: Double
  • This method searches for the given action object of the layer. Actions define dynamic behaviors for a layer. For example, the animatable properties of a layer typically have corresponding action objects to initiate the actual animations. When that property changes, the layer looks for the action object associated with the property name and executes it. You can also associate custom action objects with your layer to implement app-specific actions.

    Declaration

    Swift

    public override func actionForKey(key: String) -> CAAction?

    Parameters

    key

    The identifier of the action.

    Return Value

    the action object assigned to the specified key.