Use duration property in counting label in order to have the same duration in both animations
Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -157,7 +157,7 @@ displayCountingLabel:(BOOL)displayCountingLabel | @@ -157,7 +157,7 @@ displayCountingLabel:(BOOL)displayCountingLabel | ||
| 157 | [_circle addAnimation:pathAnimation forKey:@"strokeEndAnimation"]; | 157 | [_circle addAnimation:pathAnimation forKey:@"strokeEndAnimation"]; |
| 158 | _circle.strokeEnd = [_current floatValue] / [_total floatValue]; | 158 | _circle.strokeEnd = [_current floatValue] / [_total floatValue]; |
| 159 | 159 | ||
| 160 | - [_countingLabel countFrom:0 to:[_current floatValue] withDuration:1.0]; | 160 | + [_countingLabel countFrom:0 to:[_current floatValue] withDuration:self.duration]; |
| 161 | 161 | ||
| 162 | 162 | ||
| 163 | // Check if user wants to add a gradient from the start color to the bar color | 163 | // Check if user wants to add a gradient from the start color to the bar color |
-
Please register or login to post a comment