title: How can I make an UILabel appear and disappear 5 times?
body: <p>When I press a button, a view with a label appears. Then I want the label to disappear and reappear 5 times (with animation), each time the label reappears with different text.
  I can't seem to get the any code to work to animate a UILabel and change the text. I have tried this. However, when I press the button, the loop and animations occur instantly.</p>
  
  <p>The duration is a follows: 0.3, 0.6, 0.9, 1.2, 1.5</p>
  
  <pre><code>for i in 1...5 {
  
              infoViewMsgLbl.text = randomReward(real: i) // This retrives a String
  
              UIView.animate(withDuration: ((1.5/5)*Double(i)), delay: 0.0, options: .allowAnimatedContent, animations: { 
                  self.infoViewMsgLbl.alpha = 0
              }, completion: { finished in
                  UIView.animate(withDuration: ((1.5/5)*Double(i)), animations: { 
                      self.infoViewMsgLbl.alpha = 1
                  })
              })
  
              print("in the loop: ", i)
          }
  </code></pre>