CATransaction animationDuration
+ (CFTimeInterval)animationDuration
Return Value
An interval of time used as the duration.
Discussion of [CATransaction animationDuration]
You can retrieve the animation duration for a specific transaction by calling the valueForKey: method of the transaction object and asking for the kCATransactionAnimationDuration key.
CATransaction animationDuration example.
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"path"];
animation.duration = [CATransaction animationDuration];
animation.timingFunction = [CATransaction animationTimingFunction];
animation.fromValue = (id)oldPath;
animation.toValue = (id)path;
[self addAnimation:animation forKey:@"pathAnimation"];
animation.duration = [CATransaction animationDuration];
animation.timingFunction = [CATransaction animationTimingFunction];
animation.fromValue = (id)oldPath;
animation.toValue = (id)path;
[self addAnimation:animation forKey:@"pathAnimation"];
Example of [CATransaction animationDuration].
Find out the animation duration of the current animation block
[CATransaction animationDuration] is what you're looking for
[CATransaction animationDuration] is what you're looking for