Is there an iOS equivalent appendBezierPathWithArcWithCenter

I am trying to draw a quarter circle in iOS. On Mac OS, it seems like you can use appendBezierPathWithArcWithCenter, but that doesn't seem to work on iOS.

Does anyone know how to simply draw a quarter circle in iOS?

thanks

+4
source share
1 answer

There are two iOS equivalents, one for UIBezierPath and one for CGPath :

UIBezierPath equivalent

 UIBezierPath *path = [UIBezierPath bezierPath]; [path addArcWithCenter:centerPoint radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; 

CGPath equivalent

 CGMutablePathRef path = CGPathCreateMutable(); CGPathAddArc(path, NULL, centerPoint.x, centerPoint.y, radius, startAngle, endAngle, NO); // clockwise 
+3
source

All Articles