title: Swift: Pass parameter value to Selector function
body: <p>I'm trying to pass value from addKey function to Selector function (didTapAny function) but couldn't figure how. Below is my code:</p>
  
  <pre><code>var keyName: UIButton!
  func addKey(var keyTitle: String, var yValue: Float32){
      keyName = UIButton.buttonWithType(.System) as UIButton
      keyName.setTitle(keyTitle, forState: .Normal)
      keyName.sizeToFit()
      keyName.setTranslatesAutoresizingMaskIntoConstraints(false)
  
      // Couldn't figure how to pass parameter value to Selector at this line
      // action: Selector("didTapAny:")
      keyName.addTarget(self, action: "didTapAny", forControlEvents: .TouchUpInside)
  
      keyName.titleLabel.font = UIFont.systemFontOfSize(24)
      keyName.backgroundColor = UIColor(white: 0.9, alpha: 9)
      keyName.layer.cornerRadius = 5
      view.addSubview(keyName)
      var keyNameButtonLeftSideConstraint = NSLayoutConstraint(item: keyName, attribute: .CenterY, relatedBy: .Equal, toItem:view, attribute:.CenterY, multiplier: 1.0, constant: 0.0)
      var keyNameButtonBottomConstraint = NSLayoutConstraint(item: keyName, attribute: .CenterX, relatedBy: .Equal, toItem: view, attribute: .CenterX, multiplier: 1.0, constant: yValue)
      view.addConstraints([keyNameButtonLeftSideConstraint, keyNameButtonBottomConstraint])
  }
  
  // want to pass above function's keyTitle to this function
  func didTapAny(keyTitle: String){
      var proxy = textDocumentProxy as UITextDocumentProxy
      proxy.insertText(keyTitle)
  }
  </code></pre>
  
  <p>Thanks.</p>