CGPointcenter =CGPointMake(self.frame.size.width*0.5,self.frame.size.height*0.5);
CGFloatradius =self.frame.size.width*0.5-50;
UIBezierPath*path = [UIBezierPathbezierPath];
[pathaddArcWithCenter:centerradius:radiusstartAngle:M_PI_2*3endAngle:M_PI_2clockwise:YES];
[pathaddCurveToPoint:CGPointMake(center.x, center.y- radius)controlPoint1:CGPointMake(center.x+ radius , center.y)controlPoint2:CGPointMake(center.x- radius , center.y)];
[[UIColorwhiteColor]setStroke];
[[UIColorblackColor]setFill];
path.lineWidth=5;
[pathstroke];
[pathfill];
UIBezierPath*path2 = [UIBezierPathbezierPath];
[path2addArcWithCenter:centerradius:radiusstartAngle:M_PI_2endAngle:M_PI_2*3clockwise:YES];
[path2addCurveToPoint:CGPointMake(center.x, center.y+ radius)controlPoint1:CGPointMake(center.x- radius , center.y)controlPoint2:CGPointMake(center.x+ radius , center.y)];
[[UIColorblackColor]setStroke];
[[UIColorwhiteColor]setFill];
path2.lineWidth=5;
[path2stroke];
[path2fill];
网友评论