From 8de1cbe3202f17816130405f8d887a90e4e141fe Mon Sep 17 00:00:00 2001 From: Maximilian Buschner Date: Mon, 8 Feb 2016 15:49:54 +0100 Subject: [PATCH] remove all animations instead of explicit to avoid layering them in table view somehow --- DACircularProgress/DACircularProgressView.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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]; } }