title: swift background color animation loop
body: <p>I want the background color of my iOS app to change between four colors over x amount of seconds</p>
  
  <p>This is what I have so far (it does exactly what I want when I specify just 2 colors)</p>
  
  <p>I also need the animation to run in a loop infinitely.</p>
  
  <p><em>ViewController.swift</em></p>
  
  <pre><code>    UIView.animateWithDuration(X.0, animations: {
          // Color 1
          self.view.backgroundColor = UIColor(rgba)
          // Color 2
          self.view.backgroundColor = UIColor(rgba)
          // Color 3
          self.view.backgroundColor = UIColor(rgba)
          // Color 4
          self.view.backgroundColor = UIColor(rgba)
  
      })
  </code></pre>