CAAction Protocol Reference

Adopted by
Framework
/System/Library/Frameworks/QuartzCore.framework
Availability
Available in OS X v10.5 and later.
Declared in
CALayer.h
Companion guides

Overview

The CAAction protocol provides an interface that allows an object to respond to an action triggered by an CALayer. When queried with an action identifier (a key path, an external action name, or a predefined action identifier) the layer returns the appropriate action object–which must implement the CAAction protocol–and sends it a runActionForKey:object:arguments: message.

Tasks

Responding to an Action

Instance Methods

runActionForKey:object:arguments:

Called to trigger the action specified by the identifier. (required)

- (void)runActionForKey:(NSString *)key object:(id)anObject arguments:(NSDictionary *)dict
Parameters
key

The identifier of the action. The identifier may be a key or key path relative to anObject, an arbitrary external action, or one of the action identifiers defined in CALayer Class Reference.

anObject

The layer on which the action should occur.

dict

A dictionary containing parameters associated with this event. May be nil.

Availability
  • Available in OS X v10.5 and later.
Declared In
CALayer.h