Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for animating progressColor & progressStrokeColor #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LeoSnek
Copy link

@LeoSnek LeoSnek commented Oct 9, 2018

I've added support to change progressColor & progressStrokeColor in an animation block.

This can be tested in MBViewController with the following animate body:

CGFloat newValue = 100.f - self.progressBar.value;
UIColor *newColor = (newValue < 50.f) ? [UIColor orangeColor] : [UIColor blueColor];

[UIView animateWithDuration:self.animatedSwitch.on * 1.f animations:^{
    self.progressBar.value = newValue;
    self.progressBar.progressColor = newColor;
    self.progressBar.progressStrokeColor = newColor;
}];

The declarations of both properties in MBCircularProgressBarView are unchanged as UIColors so this change won't break anyone's code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant