title: CABasicAnimation on strokeEnd
body: <p>I have a <code>CAShapeLayer</code> in form of a square and I set the <code>width</code> to be 2.0f.</p>
  
  <p>I would like to animate its <code>strokeEnd</code> and for that I use a <code>CABasicAnimation</code> like so:</p>
  
  <pre><code>CABasicAnimation *stroke = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
  stroke.fromValue = @(0);
  stroke.toValue = @(1); 
  stroke.repeatCount = 1;
  stroke.duration = 10.0f;
  stroke.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
  [myLayer addAnimation:stroke forKey:nil];
  </code></pre>
  
  <p>And it works. From the book by Matt Neuberg, I understand that we could omit the <code>toValue</code> and <code>fromValue</code> altogether by:</p>
  
  <pre><code>[CATransaction begin];
  [CATransaction setDisableActions:YES];
  ..
  ..
  [CATransaction commit];
  </code></pre>
  
  <p>His example was, however, based on <code>transform</code>. And I am trying to achieve the same instead with <code>strokeEnd</code>.</p>
  
  <p>The best I can do is to set the <code>strokeEnd</code> within <code>CATransaction</code> block to either 1 or 0 and set the <code>fromValue</code> correspondingly. Other words I don't seem to be able omit both <code>toValue</code> and <code>endValue</code> on animating <code>strokeEnd</code> - I need at least one of them (i.e., <code>fromValue</code> or <code>toValue</code>).</p>
  
  <p>So my question is, how could I be able to animate <code>strokeEnd</code> without needing to use <code>toValue</code> and <code>fromValue</code> at all?</p>
  
  <p>Thanks.</p>