? Estoy tratando de dibujar un semicírculo utilizando Core Graphics y llenándolo con un poco de color. Quiero reemplazar el color con la imagen usando CALayer. ¿Alguien puede ayudar a hacer esto? ¡Gracias!¿Cómo puedo dibujar un semicírculo usando CoreGraphics
El código va para aquí.
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 2);
CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
CGContextMoveToPoint(context, 0, 500);
CGContextAddArc(context, 60, 500, 50, 90, 180, 0);
CGContextStrokePath(context);
Este enlace puede ayudarle a: http://stackoverflow.com/questions/3729690/draw-part- de-a-circle y también verificar: http://stackoverflow.com/questions/2835448/how-to-draw-a-rounded-rectangle-in-core-graphics-quartz-2d – Devang