title: Rotating NSView that holds an NSImageView
body: <p>I am creating an NSView, which in its drawRect method creates and adds an NSImageView as a subview.</p>
  
  <p>I would like to rotate this NSImageView (circleView), or [self]. So in another method, I am trying to do that:</p>
  
  <pre><code>-(void)startAnimation {
  CABasicAnimation* spinAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
  spinAnimation.toValue = [NSNumber numberWithFloat:5*2*M_PI];
  spinAnimation.duration = 2;
  [circleView.layer addAnimation:spinAnimation forKey:@"spinAnimation"];
  }
  </code></pre>
  
  <p>However, this code doesn't do anything when the method is called. Am I doing something wrong? I tried self.layer and circleView.layer but neither seem to work...</p>