title: Button tap and long press gesture
body: <p>I'm having a little trouble with the gestures.</p>
  
  <p>I'm trying to use both tap and long press on the same button, so I've used </p>
  
  <pre><code>@IBAction func xxx (sender: UITapGestureRecognizer)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@IBAction func xxx (sender: UILongPressGestureRecognizer)
  </code></pre>
  
  <p>but my button seems to react to both functions when I tap. What might be wrong?</p>
  
  <pre><code>func long(longpress: UIGestureRecognizer){
      if(longpress.state == UIGestureRecognizerState.Ended){
      homeScoreBool = !homeScoreBool
      }else if(longpress.state == UIGestureRecognizerState.Began){
          print("began")
      }
  }
  </code></pre>