title: How do I capture a button event type in swift
body: <p>I'm having trouble finding information on how to capture touch events. Event.type and event.description does not help me, and the documentation does not have examples as far as I can tell.</p>
  
  <p>I'm creating an IBAction on several buttons and want the (shared) action to deal with named buttons (sender.currentTitle) and (events.??) to add code for whether the button was tapped or long pressed.</p>
  
  <pre><code> @IBAction func ChangeSort(sender: UIButton, forEvent event: UIEvent!)     {
              //  Trying to capture the button action? Type?? Description?
  
  
   switch event.type   {
             case "Touch Up Inside":  
              //  Switching on currenttitle works fine.
              switch sender.currentTitle! {
              case "Amount":
                  MyQueries.QppQueryOrderBy = "Order by Amount"
                  //  Mylabel.text = "sss"
              default: ...
              }
          case "Touch Down Repeat":
              print("In long press")
              switch sender.currentTitle! {
              case "Amount":
                  MyQueries.QppQueryOrderBy = "Order by Amount desc"
              default: ...
              }
          default:
              print("in def")
              switch sender.currentTitle! {
              case "Amount":...
                  MyQueries.QppQueryOrderBy = "Order by LastActivityDate desc"
              default:
                  MyQueries.QppQueryOrderBy = "Order by Amount desc"
              }
  
          }
          self.theTableView.reloadData()
  }
  </code></pre>