Guest User

Untitled

a guest
Jul 18th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. - (void)drawRect:(CGRect)rect
  2. {
  3. UIBezierPath *bezierPath = [UIBezierPath bezierPath];
  4. [bezierPath addArcWithCenter:CGPointMake(self.frame.size.width, self.frame.size.height/2) radius:150 startAngle:0 endAngle:2 * M_PI clockwise:YES];
  5. CAShapeLayer *progressLayer = [[CAShapeLayer alloc] init];
  6. [progressLayer setPath:bezierPath.CGPath];
  7. [progressLayer setStrokeColor:[UIColor colorWithWhite:1. alpha:.2].CGColor];
  8. [progressLayer setFillColor:[UIColor colorWithRed:67.0/255.0 green:144.0/255.0 blue:246.0/255.0 alpha:1.0].CGColor];
  9. [progressLayer setLineWidth:.7 * self.bounds.size.width];
  10. [[self layer] addSublayer:progressLayer];
  11. // [self drawWheel];
  12. }
Add Comment
Please, Sign In to add comment