title: My CALayer transform holds after animation, but the perspective disappears
body: <p>I have the following code that rotates a CALayer by -45degrees on the Y axis:</p>
  
  <pre><code>#define D2R(x) (x * (M_PI/180.0))
  
  - (void) swipe:(UISwipeGestureRecognizer *)recognizer
  {        
      CATransform3D transform = CATransform3DMakeRotation(D2R(-45), 0, 1.0, 0);
      transform.m34 = -1.0 / 850;
  
      CABasicAnimation *transformAnimation = [CABasicAnimation animationWithKeyPath: @"transform"];
      transformAnimation.fillMode = kCAFillModeForwards;
      transformAnimation.removedOnCompletion = NO;
      transformAnimation.toValue = [NSValue valueWithCATransform3D:transform];
      transformAnimation.duration = 0.5;
  
      [self.layer addAnimation:transformAnimation forKey:@"transform"];
  }
  </code></pre>
  
  <p>The animation works, except it ends with no perspective - ignoring my m34 setting if I'm understanding things correctly.</p>
  
  <p>Halfway through:</p>
  
  <p><img src="https://i.stack.imgur.com/K8oMH.png" alt="enter image description here"></p>
  
  <p>At the end:</p>
  
  <p><img src="https://i.stack.imgur.com/2IEDj.png" alt="enter image description here"></p>
  
  <p>What am I doing wrong?</p>