How can I detect when a user pressed \"return\" keyboard button while editing UITextField? I need to do this in order to dismiss keyboard when user pressed the \"return\" bu
You can now do this is storyboard using the sent event 'Did End On Exit'.
In your view controller subclass:
@IBAction func textFieldDidEndOnExit(textField: UITextField) { textField.resignFirstResponder() }
In your storyboard for the desired textfield: