Ich versuche, einen Halbkreis mit Core Graphics zu zeichnen und es mit etwas Farbe zu füllen. Ich möchte Farbe mit Bild durch Verwendung von CALayer ersetzen. Kann jemand helfen, wie man das macht Danke!Wie kann ich einen Halbkreis zeichnen mit CoreGraphics
Code geht hier.
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);
Dieser Link kann Ihnen helfen: http://stackoverflow.com/questions/3729690/draw-part- von einem Kreis und auch überprüfen: http://stackoverflow.com/questions/2835448/how-to-draw-a-rounded-rectangle-in-core-graphics-quartz-2d – Devang