iOS 畫圓圈

實線圓圈:

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


發佈了36 篇原創文章 · 獲贊 0 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章