Mac Developer Library

Developer

QuartzCore Framework Reference CAAction Protocol Reference

Options
Deployment Target:

On This Page
Language:

CAAction

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.

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import QuartzCore

Objective-C

@import QuartzCore;

Availability


Available in OS X v10.5 and later.
  • Called to trigger the action specified by the identifier. (required)

    Declaration

    Swift

    func runActionForKey(_ key: String!, object anObject: AnyObject!, arguments dict: [NSObject : AnyObject]!)

    Objective-C

    - (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.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.