I would like to draw a circular gradient, as in the image below. I can easily control the radial gradient, but I'm not sure how to make a circular. I thought to draw a gradient on a line and then convert it to a circle. Is it possible?

This is how I draw a radial gradient:
CGFloat a = MIN(self.frame.size.width, self.frame.size.height) - _lineWidth;
Thanks a lot!
source share