I have a custom CAShapeLayer class and there I am drawing a circular image using “ bezierPathWithArcCenter ” with some stroke color. That works fine and I am getting a circular image. Now to add a gradient to this. I have add the below lines
_gradient = [CAGradientLayer layer];
_gradient.colors = @[(id)[UIColor greenColor].CGColor,
(id)[UIColor colorWithWhite:0.90 alpha:1.0].CGColor];
_gradient.frame = CGPathGetBoundingBox(_progressLayer.path);
Where _gradient.frame = CGPathGetBoundingBox(self.path) always returns 0.
Where am I making the mistake??
I want view like below
Thanks in advance.