UIBezierPath *path = [UIBezierPath bezierPath];
[[UIColor blueColor] setFill];
[path moveToPoint:CGPointMake(20, 220)];
[path addArcWithCenter:CGPointMake(90, 220) radius:70.0 startAngle:M_PI endAngle:M_PI*2 clockwise:NO];
[path addArcWithCenter:CGPointMake(230, 220) radius:70.0 startAngle:M_PI endAngle:M_PI*2 clockwise:YES];
[path addArcWithCenter:CGPointMake(160, 220) radius:140.0 startAngle:M_PI*2 endAngle:M_PI clockwise:YES];
[path fill];
path = [UIBezierPath bezierPath];
[[UIColor redColor] setFill];
[path moveToPoint:CGPointMake(20, 220)];
[path addArcWithCenter:CGPointMake(90, 220) radius:70.0 startAngle:M_PI endAngle:M_PI*2 clockwise:NO];
[path addArcWithCenter:CGPointMake(230, 220) radius:70.0 startAngle:M_PI endAngle:M_PI*2 clockwise:YES];
[path addArcWithCenter:CGPointMake(160, 220) radius:140.0 startAngle:M_PI*2 endAngle:M_PI clockwise:NO];
[path fill];
'code snippet' 카테고리의 다른 글
[ObjectiveC] ARC 사용 여부 체크 (0) | 2012.06.21 |
---|---|
[iOS] NSString과 NSMutableString을 이용한 append 속도 비교 (0) | 2010.12.29 |
[iOS] 한영이 섞인 XML 파싱시 한/영 분리 문제.. NSXMLParser (0) | 2010.12.28 |
[android] 루팅 여부를 알아보기 (0) | 2010.07.28 |
[iPhone] TabBar의 색상 바꾸기 (0) | 2010.07.06 |