0

How can I send another object to textFieldDidChange function?

    regName.delegate = self

    regName.addTarget(self, action: "textFieldDidChange:", forControlEvents: UIControlEvents.EditingChanged)

func textFieldDidChange(textField: UITextField, errorLabel: UILabel) {

        validateReg(textField.text!, textField: textField, errorLabel: errorLabel)
    }
SNos
  • 3,430
  • 5
  • 42
  • 92
  • Possible duplicate of [Attach parameter to button.addTarget action in Swift](http://stackoverflow.com/questions/24814646/attach-parameter-to-button-addtarget-action-in-swift) – Brian Rogers Nov 20 '15 at 05:28

1 Answers1

0

As far as I know you cannot do this

Bobj-C
  • 5,276
  • 9
  • 47
  • 83