title: Why is `transform.rotation` available for CoreAnimation but not accessible using a getter?
body: <p>I see a lot of code that rotates a view as follows:</p>
  
  <pre><code>CABasicAnimation *centerToRightRotate
      = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
  centerToRightRotate.fromValue = @(0);
  centerToRightRotate.toValue = @(M_PI/8);
  centerToRightRotate.duration = 0.15;
  
  [self.view.layer addAnimation:centerToRightRotate forKey:nil];
  </code></pre>
  
  <p>(for example, many of the answers to <a href="https://stackoverflow.com/questions/27755504/rotate-a-view-for-360-degrees-indefinitely-in-swift">this question</a>)</p>
  
  <p>However, when I try to access <code>self.view.layer.transform.rotation</code> or <code>self.view.layer.transform.rotation.z</code>, the compiler will tell me "No member named 'rotation' in CATransform3D". The <a href="https://developer.apple.com/documentation/quartzcore/catransform3d" rel="nofollow noreferrer">docs for <code>CATransform3D</code></a> also does not show <code>rotation</code> as an instance property.</p>
  
  <p>My guess is <code>CAAnimation</code> is somehow translating the <code>transform.rotation</code> key path into the appropriate transformation, but I want to know what is actually going on under the hood. What exactly is going on here?</p>