title: CAShapeLayer animation flash when I set duration very small
body: <p>I want to realize a round progress, and the progress value can be set dynamically. The code is followed:</p>
  
  <pre><code>- (CGPoint)center {
    return CGPointMake(self.view.frame.origin.x + self.view.frame.size.width / 2.0,
                   self.view.frame.origin.y + self.view.frame.size.height / 2.0);
  }
  
  - (void)viewDidLoad {
    [super viewDidLoad];
  
    // Do any additional setup after loading the view.
  
    CGMutablePathRef roundPath = CGPathCreateMutable();
    CGPathAddArc(roundPath, NULL, self.center.x, self.center.y,
             20,
             2 * M_PI + M_PI_2,
             M_PI_2,
             YES);
  
    CAShapeLayer *backgroundLayer = [CAShapeLayer layer];
    backgroundLayer.frame = self.view.layer.bounds;
    backgroundLayer.path = roundPath;
    backgroundLayer.strokeColor = [[NSColor blueColor] CGColor];
    backgroundLayer.fillColor = nil;
    backgroundLayer.lineWidth = 10.0f;
    backgroundLayer.lineJoin = kCALineJoinBevel;
    [self.view.layer addSublayer:backgroundLayer];
  
    CAShapeLayer *pathLayer = [CAShapeLayer layer];
    pathLayer.frame = self.view.layer.bounds;
    pathLayer.path = roundPath;
    pathLayer.strokeColor = [[NSColor whiteColor] CGColor];
    pathLayer.fillColor = nil;
    pathLayer.lineWidth = 10.0f;
    pathLayer.lineJoin = kCALineJoinBevel;
    [self.view.layer addSublayer:pathLayer];
  
    self.pathLayer = pathLayer;
    [self start];
  }
  
  - (void)start {
    CABasicAnimation *pathAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
    pathAnimation.duration = 0.01;
    pathAnimation.fromValue = [NSNumber numberWithFloat:self.progress];
    pathAnimation.toValue = [NSNumber numberWithFloat:self.progress+0.01];
    [self.pathLayer setStrokeEnd:self.progress + 0.01];
    [pathAnimation setDelegate:self];
    [self.pathLayer addAnimation:pathAnimation forKey:@"strokeEndAnimation"];
  }
  
  - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag {
    self.progress += 0.01;
    if (self.progress &lt; 1.0) {
    [self start];
    }
  }
  </code></pre>
  
  <p>I found when I set the duration be 0.1f or even bigger, it will work right.But if I set the duration be 0.01f, the animation will not start from the correct value, it will animate from a bigger value then decrease to the correct value. So the whole animation always flash, anybody got the same question or know why? Thanks very much!</p>