From fbd51fc393480fee62044b4345aece12928a50df Mon Sep 17 00:00:00 2001 From: Benjamin Barbe Date: Wed, 1 Nov 2017 13:58:42 +0100 Subject: [PATCH] beginTime now use the animation speed value for proper transition --- lottie-ios/Classes/Private/LOTAnimationView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lottie-ios/Classes/Private/LOTAnimationView.m b/lottie-ios/Classes/Private/LOTAnimationView.m index 993b351fd4..9e80698590 100644 --- a/lottie-ios/Classes/Private/LOTAnimationView.m +++ b/lottie-ios/Classes/Private/LOTAnimationView.m @@ -323,7 +323,7 @@ static NSString * const kCompContainerAnimationKey = @"play"; animation.delegate = self; animation.removedOnCompletion = NO; if (offset != 0) { - animation.beginTime = CACurrentMediaTime() - offset; + animation.beginTime = CACurrentMediaTime() - (offset * 1 / _animationSpeed); } [_compContainer addAnimation:animation forKey:kCompContainerAnimationKey]; _isAnimationPlaying = YES;