title: repeating chained animation in swift
body: <p>the function here was write in order to animation the view as following : 2 sec fade out, 2 sec fade in , 2 sec delay and repeat. for some reason the animation preform only once and do not repeat. what am i doing wrong here ? </p>
  
  <pre><code>UIView.animateWithDuration(6.0,
              delay: 0.0,
              options: [.AllowUserInteraction,.Repeat,.BeginFromCurrentState],
              animations: {
  
              UIView.animateWithDuration(2.0,
                  delay: 0.0,
                  options: [.AllowUserInteraction,.BeginFromCurrentState] ,
                  animations: {
                      //fade out
                      self.alpha = 0.5
                  },
                  completion: { finished in
  
                      UIView.animateWithDuration(2.0,
                          delay: 0.0,
                          options: [.AllowUserInteraction,.BeginFromCurrentState],
                          animations: {
                              //fade in
  
                              self.alpha = 1.0
                          },
                          completion: { finished in
  
                              UIView.animateWithDuration(2.0,
                                  delay: 0.0,
                                  options: [.AllowUserInteraction,.BeginFromCurrentState],
                                  animations: {
  
                                  },
                                  completion: { finished in                                    
                              })                                                             
                     })                              
              })
          },
          completion: { finished in
      })
  }
  </code></pre>