No, CAAction
has not been used in any other APIs. When the protocol was designed it was left generic in case it became useful later, but nothing came up.
It’s simple to define and invoke your own layer actions. A contrived example could be to dispatch a “mouseDown” action into the hit-tested layer passing some kind of event-specific data:
CALayer *layer = myHitTest(…);
[[layer actionForKey:@“mouseDown”]
runActionForKey:@“mouseDown” object:layer arguments:@{…}];
Here you’d not want the action to add an animation, so would implement the CAAction
protocol on the class that handles the events, then put an instance of that class in the layer's actions
dictionary.