I’ve been trying to achieve a UI animation where the dashed outline of a button/frame spins around it. Here is a little video for better understanding:
I have absolutely no idea how i would manage to do this and would
like to learn more about it. I thought about using UIGradient on a UIStroke, but the result is pretty disappointing. Any help would be appreciated.
Every UIGradient has a property called Rotation. By continuously changing the Rotation over time, the gradient will spin around the object. This lets you take a striped ColorSequence and rotate it so the stripes appear to circle the frame.