title: Getting Text from UILabel on Tap
body: <p>I'm generating <code>UILabel</code>s programmatically and giving them each a tap gesture recognizer. </p>
  
  <p>I'd like to access the text in each label when they are tapped. </p>
  
  <p>You can see my code below. I've already looked through other answers and have tried to duplicate. But, I'm still getting a crash</p>
  
  <blockquote>
    <p>"unrecognized selector sent to instance"</p>
  </blockquote>
  
  <p>whenever I try to tap the labels.</p>
  
  <pre><code>func placeLabelCenterish(){
  
      let pushedLabel = UILabel(frame: CGRectMake(0,0,self.view.frame.size.width,25))
      pushedLabel.center = CGPointMake((self.view.frame.size.width)/2, 200)
      pushedLabel.textAlignment = .Center
      pushedLabel.font = UIFont.boldSystemFontOfSize(15)
      pushedLabel.text = "HERE"
      self.view.addSubview(pushedLabel)
      let tap = UITapGestureRecognizer()
  
      tap.addTarget(self, action: "nameTap")
      pushedLabel.addGestureRecognizer(tap)
      pushedLabel.userInteractionEnabled = true
  }
  
  func nameTap(sender : UIGestureRecognizer){
      print("tapped")
      let thisLabel = sender.view as! UILabel
      print(thisLabel.text)
  }
  </code></pre>
  
  <p>When I remove the sender : <code>UIGestureRecognizer</code> parameters from the second method, it prints "tapped" fine. So, I know it's receiving the tap. </p>
  
  <pre><code>func nameTap(){
      print("tapped")
  }
  </code></pre>