I have implemented a layer-based view that acts as the layer delegate
and defines a layer action named "test".
Afterwards I create a CABasic animation to animate the test property.
If you look at the line marked 'THIS WORKS",
you'll see that sending "setValue:forKey" triggers a message
"runActionForKey:object:arguments",
but using the property for a basic animation will not trigger the
CAAction.
So here's my simple question. What is needed to "animate" a generic
property named test?
Did I mis-read the documentation and wrongly assumed that any property
can be used as
long as there's a CAAction?
By the way, changing the "keyPath" to something like
"bounds.size.width" works as expected.
/* Get the CAAction for "test", or nil for all others */
- (id<CAAction>) actionForLayer:(CALayer *)theLayer forKey:(NSString
*)theKey
{
id res = [theLayer.actions valueForKey:theKey];
NSLog(@"actionForLayer:%p forKey:\"%@\" = %p", theLayer, theKey,
res);
return res;
}