-
Notifications
You must be signed in to change notification settings - Fork 38
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
Timing parameter for render a new color set #11
Comments
Hey @JLightMedia, the animation might be introduced by the default implicit animation duration of Can you please try wrapping the call for changing the colors inside a CATransaction.begin()
CATransaction.setAnimationDuration(0)
gradientProgressBar.gradientColors = [...]
CATransaction.commit() |
Wow! It works! Thanks! But I've noticed one bad feature. When I change of color quantity for gradient, it renders without any fade, even I use 3 seconds for transition. If prevues color set have the same number of colours transition work fine. Do you know why is that? And is there any way to fix that? |
@JLightMedia Can you please provide some example code? :) |
Gradient progress bar is behind translucent UINavigation Bar |
Okay, I've been able to reproduce the issue but unfortunately I did not find a solution :/ I tried to animate changing the colors of a basic Not sure if this is a good work-around, but maybe you can try to always have the same amount of colors, e.g. instead of having
use
|
Thank you! Yeah I see that is the most right solution. But it doesn't look good for memory optimisation. Anyway I'll try that. |
Hi. Is there any way to change timing parameter for render a new color set? Now it's executed with lite fade, but sometimes I need to change color immediately. For example in viewDidAppear method, for prepare UI.
The text was updated successfully, but these errors were encountered: