I'm trying to get "Done" button on to load an action, preferably the action that I have for my button.
Here's the UITextField declaration
let someTextField = UITextField()
Trying to add a target to the textField
someTextField.addTarget(self, action: "loginActionButton", forControlEvents: .EditingDidEndOnExit)
Best How To :
When the "Return Key" (or "Done") button is tapped, the delegate of your textfield will receive a set of callbacks including
textFieldDidEndEditing:. To respond to these, implement a
UITextFieldDelegate and execute your action there, i.e. call
loginActionButton in one of the delegate methods.
Relevant Documentation: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextFieldDelegate_Protocol/#//apple_ref/occ/intfm/UITextFieldDelegate/textFieldDidEndEditing: