I trying to draw custom arc in current context, but the result is not what i expected to see, i have the simple lines of code if draw method.
-(void) drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextBeginPath(context);
CGContextSetGrayFillColor(context, 1.0, 0.7);
CGContextMoveToPoint(context, 100,100);
CGContextAddArc(context, 100, 100, 80, 0, M_PI_2, 0);
CGContextClosePath(context);
CGContextFillPath(context);
}
and here is the result.
But I'm was expected to see result like this. Why M_PI_2 appears on bottom side of the circle? there should be a 3*M_PI_2, what I'm doing wrong?