kaandedeoglu / KDCircularProgress

A circular progress view with gradients written in Swift
MIT License
1.21k stars 217 forks source link

Gradient along the circle #63

Closed RobertSibek closed 7 years ago

RobertSibek commented 7 years ago

I want to use just two colors and show linear gradient along the circle like on this picture: https://raw.githubusercontent.com/kaandedeoglu/KDCircularProgress/master/Assets/screenshot3.jpg

How can I do that please?

kaandedeoglu commented 7 years ago
progress.set(colors: .white, .orange)

should do the trick!

RobertSibek commented 7 years ago

It's working for static image, but if I want to animate the progress it looks like the gradient is rotating. Imagine progress with white color for 0% and red for 100%. What I'm looking for is to see flawless gradient from white to red where white is always in 0% and full red in 100%.

Like this: circlegradient

kaandedeoglu commented 7 years ago

I'm afraid this will not work - see #38

If you want to stop the gradient from rotating, try setting gradientRotateSpeed to 0.

RobertSibek commented 7 years ago

I see. Thanks anyway for your effort.

iamsanketray123 commented 5 years ago

This would be a nice feature to have. I am sure this is a requirement for a lot of people.