title: Animating a double variable in Swift
body: <p>There's many code that show how to use View.animate to animate the properties of a view but none to animate a simple double variable.
  I'm using CoreGraphic to draw some charts. Below the c# code to draw a bar:</p>
  
  <pre><code>var rectanglePath = UIBezierPath.FromRoundedRect(new CGRect(x,y,w,h*coef), corner);
  color.SetFill();
  rectanglePath.Fill();
  </code></pre>
  
  <p>I'm using a double (coef) that goes from 0 to 1 in the goal of having the bar growing but I don't find how to do. I tried using view.animate but it put the value to 1 in one frame when it works gradualy with alpha. </p>
  
  <p>So what is the right way to do that ? (in swift or c# it's ok)</p>