title: UIView.animateWithDuration swift loop animation
body: <p>In ViewController.Swift I managed to make a box animate from one point to another. I thought it would be easy to loop this so the box will animate to one point and then animate back to its original position and then loop again. I have managed to move the object to a position and in "complete" move it back again, but that doesn't make i loop. How can this be achieved?</p>
  
  <p>I thought maybe this could work but i honestly don't know:</p>
  
  <pre><code>let boxmoves = [CGRect(x: 120, y: 220, width: 100, height: 100), CGRect(x: 120, y: 120, width: 100, height: 100)]
  for boxmove in boxmoves {
      coloredSquare.frame = boxmove
  }
  </code></pre>
  
  <p>How could I center it based on the device-width (I assume there are some math involved?)?</p>
  
  <p>My code:</p>
  
  <pre><code>let coloredSquare = UIView()
  
  coloredSquare.backgroundColor = UIColor.blueColor()
  
  coloredSquare.frame = CGRect(x: 120, y: 120, width: 100, height: 100)
  
  self.view.addSubview(coloredSquare)
  
  // found repeate but this will not animate as I want.
  //UIView.animateWithDuration(2.0, delay: 0.2, options: UIViewAnimationOptions.Repeat, animations: {
  UIView.animateWithDuration(2.0, animations: {
  
      coloredSquare.frame = CGRect(x: 120, y: 220, width: 100, height: 100)
  
      }, completion: { finished in
          UIView.animateWithDuration(2.0, animations: {
          coloredSquare.frame = CGRect(x: 120, y: 120, width: 100, height: 100)
          })
  })
  </code></pre>