iOS 画圆圈

来源:互联网 发布:软件空安卓破解游戏 编辑:程序博客网 时间:2024/05/04 10:00

实线圆圈:

  CAShapeLayer *solidLine =  [CAShapeLayerlayer];

        CGMutablePathRef solidPath = CGPathCreateMutable();

        solidLine.lineWidth =1.0f ;

        solidLine.strokeColor = [UIColorgrayColor].CGColor;

        solidLine.fillColor = [UIColorclearColor].CGColor;

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

        solidLine.path = solidPath;

        CGPathRelease(solidPath);

        [self.view.layeraddSublayer:solidLine];


0 0