您的位置:首页 > 移动开发 > IOS开发

iOS 画圆圈

2016-06-08 11:42 337 查看
实线圆圈:

  CAShapeLayer *solidLine =  [CAShapeLayer
layer];

        CGMutablePathRef solidPath = 
CGPathCreateMutable();

        solidLine.lineWidth =
1.0f ;

        solidLine.strokeColor = [UIColor
grayColor].CGColor;

        solidLine.fillColor = [UIColor
clearColor].CGColor;

        CGPathAddEllipseInRect(solidPath,
nil, CGRectMake(10,
25, 72,
72);

        solidLine.path = solidPath;

        CGPathRelease(solidPath);

        [self.view.layer
addSublayer:solidLine];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  画圆圈