Buttons To Control Gradients

Hi, I've been experimenting with gradients and buttons, and I want to have a button that switches between a set of gradients, but I am not sure how. Any ideas?

Answered by ARA_06 in 693602022

Oh nevermind, I just realized I can make multiple views and have buttons transition through those

Can you show your code that explains what you have done till now and what you can do now?

This is the code so far. Some lines may seem irrelevant, but thats just because I'm planning on doing something with them later on.

Staying on topic, what I want to do is have a button that, when pressed, changes the gradient from a set list of gradients.

For example, the current result looks like this:

And then when the button is pressed, I want it to look like this with a smooth transition:

Accepted Answer

Oh nevermind, I just realized I can make multiple views and have buttons transition through those

Buttons To Control Gradients
 
 
Q