3

First sorry, when my english is bad.

I know, my question sounds like a duplicate, but it is different than the others. As it says in the title I want to add a color gradient to the stroke of an CAShapelayer, not in direction of the stroke, but perpendicular to it. For instance i want a gradient from clear to white to clear like this (ignore the grey background):

gradient 1

gradient 2

I don't know how to do something like this. I can't use an image or something like this, because I animate the stroke between the straight and the curved line.

Josef Zoller
  • 921
  • 2
  • 8
  • 24

0 Answers0