beginTime now use the animation speed value for proper transition

This commit is contained in:
Benjamin Barbe
2017-11-01 13:58:42 +01:00
committed by GitHub
parent c5f9f5bc1a
commit fbd51fc393

View File

@@ -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;