Help needed: I've got a problem with creating a shape that is filled with a gradient. To create the shape, I am using a CAShape layer and masking it with a CGPath showing an arrow. This does work. However, I can only mask the CAGradient layer if I set its frame to the same size than the view the layer is attached to. This leads to the effect shown below:
I get only a part of the desired gradient to fill the shape layer. I've created a graphic below to show the intended shape vs the currently produced one.
Any leads? Thanks!