diff --git a/DACircularProgress/DACircularProgressView.m b/DACircularProgress/DACircularProgressView.m index ec4e30f..ca044f6 100644 --- a/DACircularProgress/DACircularProgressView.m +++ b/DACircularProgress/DACircularProgressView.m @@ -203,8 +203,7 @@ - (void)setProgress:(CGFloat)progress initialDelay:(CFTimeInterval)initialDelay withDuration:(CFTimeInterval)duration { - [self.layer removeAnimationForKey:@"indeterminateAnimation"]; - [self.circularProgressLayer removeAnimationForKey:@"progress"]; + [self.layer removeAllAnimations]; CGFloat pinnedProgress = MIN(MAX(progress, 0.0f), 1.0f); if (animated) { @@ -304,7 +303,7 @@ - (void)setIndeterminate:(NSInteger)indeterminate [self.layer addAnimation:spinAnimation forKey:@"indeterminateAnimation"]; } } else { - [self.layer removeAnimationForKey:@"indeterminateAnimation"]; + [self.layer removeAllAnimations]; } }