An interface that allows objects to respond to actions triggered by a CALayer change.


protocol CAAction


When queried with an action identifier (a key path, an external action name, or a predefined action identifier) a layer returns the appropriate action object–which must implement the CAAction protocol–and sends it a run(forKey:object:arguments:) message.


Responding to an action

func run(forKey: String, object: Any, arguments: [AnyHashable : Any]?)

Called to trigger the action specified by the identifier.



Conforming Types

See Also

Layer Basics

class CALayer

An object that manages image-based content and allows you to perform animations on that content.

protocol CALayerDelegate

Methods your app can implement to respond to layer-related events.

class CAConstraint

A representation of a single layout constraint between two layers.

protocol CALayoutManager

Methods that allow an object to manage the layout of a layer and its sublayers.

class CAConstraintLayoutManager

An object that provides a constraint-based layout manager.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software