title: How to create a CATransform3D matching another made using setValue:forKey:
body: <p>I tried to create a CATransform3D, but got it wrong. The following code does what I <em>do want</em>, using key-values: </p>
  
  <pre><code>[_transitionLayer setValue:[NSNumber numberWithFloat:metrics.translationPointsX] 
      forKeyPath:@"sublayerTransform.translation.x"];
  [_transitionLayer setValue:[NSNumber numberWithFloat:metrics.radians] 
      forKeyPath:@"sublayerTransform.rotation.y"];
  [_transitionLayer setValue:[NSNumber numberWithFloat:metrics.translationPointsZ] 
      forKeyPath:@"sublayerTransform.translation.z"];
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/7IvYR.png" alt="right"></p>
  
  <p>And here's how I tried to set it up doing CATransform3D: </p>
  
  <pre><code>subLayerTransform.m34 = -0.000555;
  CATransform3D subLayerTransform = CATransform3DMakeTranslation(0, 0, 0);
  subLayerTransform = 
      CATransform3DTranslate(subLayerTransform, metrics.translationPointsX, 0, 0);
  subLayerTransform = 
      CATransform3DRotate(subLayerTransform, metrics.radians, 0, 1, 0);
  subLayerTransform = 
      CATransform3DTranslate(subLayerTransform, 0, 0, metrics.translationPointsZ);
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/nn0vp.png" alt="wrong"></p>
  
  <p>How can I create the matching transform to the one using the key-paths ? </p>