iOS 画一个圆

来源:互联网 发布:网络拓扑图标识 编辑:程序博客网 时间:2024/05/20 19:17

1.画一个实线空心圆

 //画实线大圆
                CAShapeLayer *solidLine1 = [CAShapeLayer layer];
                CGMutablePathRef solidPath1 = CGPathCreateMutable();
                solidLine1.lineWidth = 1.f;
                solidLine1.strokeColor = [UIColor redColor].CGColor;
                solidLine1.fillColor = [UIColor clearColor].CGColor;
                CGPathAddEllipseInRect(solidPath1, nil, solidFrame1);
                solidLine1.path = solidPath1;
                CGPathRelease(solidPath1);
                self.solidLine1 = solidLine1;
                [self.scoreLabel.layer addSublayer:solidLine1];

1 0
原创粉丝点击