Core Graphicsを使用して半円形を描き、色を塗りつぶします.CALayerを使用して色をimageに置き換えます。誰もがこれを行う方法を助けることができますありがとう!CoreGraphicsを使用して半円を描くにはどうすればいいですか?
コードはここにあります。
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);
このリンクはあなたを助けることがあります。http://stackoverflow.com/questions/3729690/draw-part-また、以下をチェックしてください:http://stackoverflow.com/questions/2835448/how-to-draw-a-rounded-rectangle-in-core-graphics-quartz-2d – Devang