title: Changing cornerRadius using Core Animation
body: <p>I am trying to change the corner radius of a button (OpenNoteVisible.layer) in the following way:</p>
  
  <pre><code>CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"cornerRadius"];
  animation.timingFunction = [CAMediaTimingFunction     functionWithName:kCAMediaTimingFunctionLinear];
  animation.fromValue = [NSNumber numberWithFloat:10.0f];
  animation.toValue = [NSNumber numberWithFloat:0.0f];
  animation.duration = 1.0;
  [animation.layer setCornerRadius:140.0];
  [OpenNoteVisible.layer addAnimation:animation forKey:@"cornerRadius"];
  </code></pre>
  
  <p>But this code gives an error at the line [animation.layer setCornerRadius:140.0];
  I can't understand why. I have imported Quartz core framework.</p>