美文网首页
IOS ☯️ 太极示例绘制

IOS ☯️ 太极示例绘制

作者: JakieZhang | 来源:发表于2016-12-21 09:55 被阅读29次

    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];

    相关文章

      网友评论

          本文标题:IOS ☯️ 太极示例绘制

          本文链接:https://www.haomeiwen.com/subject/nvfqvttx.html