title: Animating a View in Swift
body: <p>I've been trying to animate a UIView with a spring animation using swift. I am able to achieve it when I use objective C, however I get an error in swift. This is the animation:</p>
  
  <pre><code>UIView.animateWithDuration(3,
  usingSpringWithDamping: 0.3,
  initialSpringVelocity: 3.0,
  animations:{
  viewToAnimate.frame.offset(dx: 0, dy: 100.0)},
  completion: nil)
  </code></pre>
  
  <p>The compiler gives me an error saying </p>
  
  <pre><code>Could not find an overload for 'animateWithDuration' that accepts supplied arguments. 
  </code></pre>
  
  <p>If I delete the "usingSpringWithDamping: 0.3,
  initialSpringVelocity: 3.0," it compiles and animated fine. How can I make the spring animation in swift?</p>