title: Getting UITapGestureRecognizer's sender in Swift
body: <p>So I'm working on a selector that reminds users to pan the object instead of tapping it.
  The following code is the animation:</p>
  
  <pre><code>func labelTapped(sender:UITapGestureRecognizer)-&gt;Void{
      UIView.animateWithDuration(0.2, delay: 0, options: UIViewAnimationOptions.CurveEaseIn, animations: {
          sender.view.frame = CGRectMake(sender.view.frame.origin.x + 15, sender.view.frame.origin.y, sender.view.frame.width, sender.view.frame.height)
          }, completion:
          {(value:Bool) in
              UIView.animateWithDuration(0.2, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: {
                  sender.view.frame = CGRectMake(sender.view.frame.origin.x - 15, sender.view.frame.origin.y, sender.view.frame.width, sender.view.frame.height)
                  }, completion:
                  {(value:Bool) in
                  })
          })
  }
  </code></pre>
  
  <p>now back to the object itself.  I'm allocating a <code>UITapGestureRecognizer</code> and adding it to the object, but i'm not so sure how it works, since back in Objective-C, we used to do:</p>
  
  <pre><code>UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(labelTapped)];
  </code></pre>
  
  <p>where no parameter is needed.  However in Swift, I'll have to put in a parameter in the parenthesis after <code>labelTapped</code>, as it will give me a <code>Missing argument for parameter #1 in call</code> error:</p>
  
  <pre><code>let labelTap1=UITapGestureRecognizer(target: self, action: labelTapped())
  </code></pre>
  
  <p>How should I go about resolving this issue?  thanks!</p>