title: Add single CAAnimation to several CALayers
body: <p>I have one animation, and I want it to be added to two layers:</p>
  
  <pre><code>[view1.layer addAnimation:theAnimation
                     forKey:@"layer1_animation"];
  [view2.layer addAnimation:theAnimation
                     forKey:@"layer2_animation"];
  </code></pre>
  
  <p>But when I run my application, only the 1'st view is animating. As <a href="https://developer.apple.com/library/ios/documentation/graphicsimaging/reference/CALayer_class/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004500-CH1-SW14" rel="nofollow">documentation</a> tells, layer copies its animations:</p>
  
  <blockquote>
    <p>This object is copied by the render tree, not referenced. Therefore, subsequent modifications to the object are not propagated into the render tree.</p>
  </blockquote>
  
  <p>So my code supposed to work correctly. Is it a bug or I'm doing it wrong?</p>
  
  <p><strong>More code:</strong></p>
  
  <pre><code>CGFloat currentY = self.view1.layer.position.y;
  CABasicAnimation *yAnimation = [CABasicAnimation animationWithKeyPath:@"position.y"];
  yAnimation.fromValue = @(currentY - 2.f);
  yAnimation.toValue = @(currentY + 2.f);
  yAnimation.duration = 5.0;
  yAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
  yAnimation.repeatCount = HUGE_VALF;
  yAnimation.autoreverses = YES;
  yAnimation.fillMode = kCAFillModeBackwards;
  
  [self.view1.layer addAnimation:yAnimation
                               forKey:@"view1_y_animation"];
  [self.view2.layer addAnimation:yAnimation
                                            forKey:@"view2_y_animation"];
  </code></pre>