How to inherit animation properties while animating CALayer with implicit animation
问题 I am trying to animate a custom property on a CALayer with an implicit animation: [UIView animateWithDuration:2.0f animations:^{ self.imageView.myLayer.myProperty = 1; }]; In -actionForKey: method I need to return the animation taking care of interpolating the values. Of course I have to tell somehow the animation how to retrieve the other parameters for the animation (i.e. the duration and the timing function ). - (id<CAAction>)actionForKey:(NSString *)event { if ([event isEqualToString:@