title: Animate custom CALayer properties inside a CATransaction
body: <p>Until now I've been able to animate the custom properties of my CALayer subclass, thanks to <code>+ (BOOL)needsDisplayForKey:(NSString *)key</code> and <code>CABasicAnimations</code>.</p>
  
  <p>However it turns out that chaining animations can become very tricky because all the code takes place in a single <code>animationDidStop:finished:</code> method.</p>
  
  <p>So I wanted to switch to <code>CATransactions</code> since they support the new block syntax, which would allow me to specify a completion block with <code>+ (void)setCompletionBlock:(void (^)(void))block</code>.</p>
  
  <p>But it appears to me that <code>CATransaction</code> can only animate the so-called 'animatable properties' and it doesn't work with my custom layer properties, even with the <code>needsDisplayForKey:</code> method implemented.</p>
  
  <p>So is there a way to make custom properties in a <code>CALayer</code> to animate with <code>CATransaction</code>?</p>
  
  <p><strong>EDIT:</strong>
  My intent is to do something along the lines:</p>
  
  <pre><code>[CATransaction begin];
  [CATransaction setAnimationDuration:0.5];
  [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
  [CATransaction setCompletionBlock:^{
      NSLog(@"blabla");
  }];
  
  myLayer.myProperty = newValue;
  
  [CATransaction commit];
  </code></pre>
  
  <p>The update of myProperty value to <code>newValue</code> is not animated. I've tried to implement 
  <code>actionForLayer:forKey:</code> in the view managing myLayer to return a <code>CABasicAnimation</code>. But <code>actionForLayer:forKey:</code> is never called with the key <code>myProperty</code>. And yes, <code>myLayer</code> is not <code>view.layer</code> but a sublayer, and yes I set the delegate of <code>myLayer</code> to the containing view.</p>