Desenhar círculo com UIBezierPath
Estou tentando desenhar um círculo usando o método UIBezierPath addArcWithCenter:
UIBezierPath *bezierPath =
[UIBezierPath bezierPathWithOvalInRect:CGRectMake(0., 0., 100., 100.)];
[bezierPath addArcWithCenter:center
radius:0.
startAngle:0 endAngle:2 * M_PI clockwise:YES];
CAShapeLayer *progressLayer = [[CAShapeLayer alloc] init];
[progressLayer setPath:bezierPath.CGPath];
[progressLayer setStrokeColor:[UIColor colorWithWhite:1. alpha:.2].CGColor];
[progressLayer setFillColor:[UIColor clearColor].CGColor];
[progressLayer setLineWidth:.3 * self.bounds.size.width];
[progressLayer setStrokeStart:_volumeValue/100.];
[progressLayer setStrokeEnd:volume/100.]; // between 0 and 100
[_circleView.layer addSublayer:progressLayer];
mas o que recebo é o seguinte:
Eu tentei jogar com os diferentes parâmetros, mas sem sorte
Obrigado
ATUALIZAÇÃO:
Sinto muito se não expliquei o que estou tentando fazer:
* O círculo de fundo é desenhado usando:
[UIBezierPath bezierPathWithOvalInRect:CGRectMake(0., 0., 100., 100.)]
* Estou tentando desenhar o círculo vermelho passo a passo usando bezierPathWithOvalInRect entre 2 valores: _volumeValue e volume
Mas não consigo obter um círculo perfeito; em vez disso, obtenho a parte horizontal após determinado valor.