title: Press-and-hold button for "repeat fire"
body: <p>I have referred to countless other questions about a press-and-hold button but there aren't many related to Swift. I have one function connected to a button using the touchUpInside event:</p>
  
  <pre><code>@IBAction func singleFire(sender: AnyObject){
      //code
  }
  </code></pre>
  
  <p>...and another function that is meant to call the function above repeatedly while the same button is held down, and stop when the button is no longer pressed:</p>
  
  <pre><code>@IBAction func speedFire(sender: AnyObject){
  
      button.addTarget(self, action: "buttonDown:", forControlEvents: .TouchDown)
      button.addTarget(self, action: "buttonUp:", forControlEvents: .TouchUpOutside)
  
      func buttonDown(sender: AnyObject){
          timer = NSTimer.scheduledTimerWithTimeInterval(0.3, target: self, selector: "singleFire", userInfo: nil, repeats: true)     
      }
  
      func buttonUp(sender: AnyObject){
          timer.invalidate()
      }
  }
  </code></pre>
  
  <p>I'm not sure what I'm doing wrong, and I don't know how to setup touch events to the same button for a different function.</p>