I am trying to draw a UIBezierPath
that fades out at both ends - from alpha 0
to 1
then back to 0
. I basically want to be able to draw a gradient in a UIBezierPath from within drawRect
.
EDIT: Here's the effect I'm trying to achieve:
What about using -strokeWithBlendMode:alpha:
?
In combination with some sort of loop that keeps incrementing/decrementing the alpha value until you reach the 1 (and the increment determines the length of the "faded" segment) should work.
See here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With