-
Notifications
You must be signed in to change notification settings - Fork 18
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
Is there any chance for adding middle color for gradient? #2
Comments
Hi. Yes thats possible. Just add one more interpolation interval In SFCircleGradientLayer.m in method |
Thanks for replying. I have tried by adding another property middleColor and increase segmentCount to 24, but I didn't succeed to apply middleColor in below method:
|
It should looks like this:
Or kind of |
I have tried as per your suggestion and modified method as below:
}` You can see there is not much middle color presence. Is something I am missing which need be added? |
Oh.. check your interpolation code:
at least you should divide to segmentCount/2, overall value of f and f_cur should go from 0 to 1... please debug |
I gave couple of try but nothing working for me. |
Thank for the library. As per my requirement I need to give 3 colors, Start Color, Middle Color and End color for gradient layer. Is there any possibility to add multiple layer gradient?
The text was updated successfully, but these errors were encountered: