Change animation time for properties of a CALayer
问题 I have a CALayer to animate a change in its image contents. Now, how can I change how long it takes for this animation to take place? 回答1: It's more or less simple. You have an ivar CALayer *yourLayer . Then you set the delegate and implement the delegate method -(id<CAAction>)actionForLayer:forKey: - (void)awakeFromNib { yourLayer.delegate = self; yourLayer.name = @"yourLayer"; } - (id <CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)event { if([layer.name isEqualToString