title: Why changing values of a CAGradientLayer causes an "automatic" animation? And how can I avoid it?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3884242/how-to-prevent-calayer-from-implicit-animations">How to prevent CALayer from implicit animations?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm using a CAGradientLayer as a layer mask for an UIView. The intention is to have the possibility of showing only a part of the UIView and, reacting to user input, change the part of the view that is visible by modifying the CAGradientLayer.</p>
  
  <p>All of this works fine, however I have encountered one issue: To change the part of the UIView that is visible, I modify the values of the following properties of the CAGradientLayer:</p>
  
  <p>startPoint
  endPoint
  locations</p>
  
  <p>I change these values outside of an animation block, however the change is animated in the screen. It looks like it is executed with a default, short animation (maybe one second long, it is difficult to tell).</p>
  
  <p>My question is, why the change is being done animated? and how can I prevent the animation? (In fact I would like to have an animation, but controlled by myself, not this default one).</p>
  
  <p>As an additional observation, I know that all those properties (startPoint, endPoint and locations) are flagged as animatable, but my understanding is that this only means that they can be set inside an animation block to get the change animated.</p>