title: Swift: How to trigger functions in Xcode projects?
body: <p>I am a programming newbie, and I do not know how to trigger my functions in my project. I just need my function to run for 4 seconds, then it doesn't have to work again. I do NOT want a button to call the function, I want it to be automatic! Thanks!</p>
  
  <p>PS. The timer variables is a timer running above.</p>
  
  <pre><code>func fadeLabels() {
      if timerCount &gt; 3 {
          timer.invalidate()
          timerRunning = false
      }
  
      //Label Fade Functionality
      if timerCount == 1 {
          UIView.animateWithDuration(1.0, animations: { () -&gt; Void in
              self.countdownThree.alpha = 0
          })
      }
  
      if timerCount == 2 {
          UIView.animateWithDuration(1.0, animations: { () -&gt; Void in
              self.countdownTwo.alpha = 0
          })
      }
      if timerCount == 3 {
          UIView.animateWithDuration(1.0, animations: { () -&gt; Void in
              self.countdownOne.alpha = 0
          })
      }
  }
  </code></pre>
  
  <p>Thanks to anyone who helps my with my dumb problem!</p>