title: IOS Animations in For Loop. Adjusted delay for each but still having issues
body: <p>I'm creating a pattern matching game. Basically I have 4 square UIViews on a screen with different colors. I want one square to randomly blink followed by another square randomly blinking. For example, when the game starts lets say a red box gets randomly chosen to blink. Now on the second iteration, the red box should blink again followed by another randomly chosen box which lets say it's blue. So now we have red and blue. Now the loop starts again and now it's red, blue, green. This is what i'm trying to accomplish. If this doesn't make sense, please download the IOS game "Mimeo" which should convey exactly what i'm trying to do. Could someone please help me? I'm not having any luck and i've tried seeking out help elsewhere with no luck.</p>
  
  <pre><code>//  Created by Gary Dorman on 9/26/15.
  //  Copyright © 2015 Gary Dorman. All rights reserved.
  //
  
  import UIKit
  
  class ViewController: UIViewController {
  
  var enemyArray = [Int]()
  var userArray = [Int]()
  var currentScore = 0
  var highScore = 0
  var randomNumber = 0
  
  @IBOutlet weak var RedBox: UIView!
  @IBOutlet weak var GreenBox: UIView!
  @IBOutlet weak var BlueBox: UIView!
  @IBOutlet weak var YellowBox: UIView!
  @IBOutlet weak var ScoreLabel: UILabel!
  @IBOutlet weak var TitleImageView: UIImageView!
  
  @IBAction func startGameButton(sender: UIButton) {
      self.resetCurrentScoreAndLabel()
      self.increaseLevel()
  }
  
  func increaseLevel(){
      var delayTime = 1.0
      randomNumber = Int(arc4random_uniform(4) + 1)
      enemyArray.append(randomNumber)
      for level in 1...enemyArray.count{
         animateColorBox(self.enemyArray[level - 1], delay: delayTime)
          delayTime++
          print(enemyArray[level - 1])
      }
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
      configureBorderOnColorBoxes()
  }
  
  func configureBorderOnColorBoxes(){
  
      RedBox.layer.borderColor = UIColor.blackColor().CGColor
      GreenBox.layer.borderColor = UIColor.blackColor().CGColor
      BlueBox.layer.borderColor = UIColor.blackColor().CGColor
      YellowBox.layer.borderColor = UIColor.blackColor().CGColor
  
      RedBox.layer.borderWidth = 3
      GreenBox.layer.borderWidth = 3
      BlueBox.layer.borderWidth = 3
      YellowBox.layer.borderWidth = 3
  }
  
  func resetCurrentScoreAndLabel(){
      currentScore = 0
      ScoreLabel.text = "Score: \(currentScore)"
  }
  
  func animateColorBox(tagNumber: Int, delay: Double){
      let pauseBetweenAnimation = 1.25
      let originalColor:UIColor = self.view.viewWithTag(tagNumber)!.backgroundColor!
      UIView.animateWithDuration(1.0, delay: (delay - 1) * pauseBetweenAnimation, options: UIViewAnimationOptions.CurveEaseOut, animations: {
              self.view.viewWithTag(tagNumber)!.alpha = 0.25   
          }, completion: { finished in
              UIView.animateWithDuration(0.5, delay: (delay - 1) * pauseBetweenAnimation, options: UIViewAnimationOptions.CurveEaseOut, animations: {
                   self.view.viewWithTag(tagNumber)!.alpha = 1
  
          }, completion: nil)
      })
  }
  }
  </code></pre>